From patchwork Tue Apr 2 14:57:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1074533 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44YXPV0Pcvz9sTP for ; Wed, 3 Apr 2019 01:57:34 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A0DA7B59; Tue, 2 Apr 2019 14:57:31 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AFA609F0 for ; Tue, 2 Apr 2019 14:57:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id B0D726E0 for ; Tue, 2 Apr 2019 14:57:28 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 2 Apr 2019 17:57:23 +0300 Received: from dev-r-vrt-214.mtr.labs.mlnx. (dev-r-vrt-214.mtr.labs.mlnx [10.212.214.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x32EvNDk025807; Tue, 2 Apr 2019 17:57:23 +0300 From: Eli Britstein To: dev@openvswitch.org Date: Tue, 2 Apr 2019 14:57:06 +0000 Message-Id: <20190402145712.7290-1-elibr@mellanox.com> X-Mailer: git-send-email 2.17.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Oz Shlomo , Simon Horman , Eli Britstein Subject: [ovs-dev] [PATCH 0/6] Accelerate peer port forwarding by bypassing DP processing X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Current HW offloading solutions use embedded switches to offload OVS DP rules while using SRIOV pass-through interfaces to the guest VMs. This architecture requires the VM guests to install vendor specific drivers and is challenging for live-migration. Such caveats may force some users to fall back to SW performance while using virtio interfaces. VirtIO performance can be improved by using the HW offloading model while bridging packets from VF ports to virtio ports. The bridging logic can be implemented using simple OVS OF rules defining port-to-port forwarding between VF and virtio interfaces such as: ovs-ofctl add-flow br-fwd in_port=,actions:output= ovs-ofctl add-flow br-fwd in_port=,actions:output= This patch-set accelerates the port-to-port forwarding performance by generalizing the current patch port peer option to all port types. Once defined, the OVS DP will forward all the packets that are received by the port to its specified peer. This optimization effectively bypasses the packet parsing and rule matching logic, thus increasing the forwarding performance by more than 2X. Eli Britstein (6): netdev: Introduce peer port name as a netdevice class property netdev-vport: Use generic peer port name API for patch ports ofproto-dpif: Use peer port as a generic netdev property netdev-dpdk: Introduce peer name property for dpdk ports ofproto-dpif: Introduce peer port netdev as a netdev property dpif-netdev: Accelerate peer port forwarding by bypassing DP processing lib/dpif-netdev.c | 17 ++++++++++--- lib/netdev-dpdk.c | 55 +++++++++++++++++++++++++++++++++++++++--- lib/netdev-provider.h | 7 ++++++ lib/netdev-vport.c | 40 ++++++++++++------------------ lib/netdev-vport.h | 2 -- lib/netdev.c | 18 ++++++++++++++ lib/netdev.h | 2 ++ ofproto/ofproto-dpif.c | 14 +++++------ 8 files changed, 114 insertions(+), 41 deletions(-)