From patchwork Wed Sep 11 08:11:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Obrembski X-Patchwork-Id: 1160759 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=intel.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 46Svsq37v3z9sNk for ; Wed, 11 Sep 2019 18:18:07 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 892F510F5; Wed, 11 Sep 2019 08:12:16 +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 93A8110EC for ; Wed, 11 Sep 2019 08:12:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 16F587DB for ; Wed, 11 Sep 2019 08:12:15 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 01:12:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="214599352" Received: from mobrembx-mobl.ger.corp.intel.com ([10.103.104.26]) by fmsmga002.fm.intel.com with ESMTP; 11 Sep 2019 01:12:13 -0700 From: Obrembski To: dev@openvswitch.org Date: Wed, 11 Sep 2019 10:11:20 +0200 Message-Id: <20190911081127.2140-1-michalx.obrembski@intel.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v4 0/7] dpdk: Add support for TSO 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: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Michal Obrembski Enabling TSO offload allows a host stack to delegate the segmentation of oversized TCP packets to the underlying physical NIC, if supported. In the case of a VM this means that the segmentation of the packets is not performed by the guest kernel, but by the host NIC itself. In turn, since the TSO calculations and checksums are being performed in hardware, this alleviates the CPU load on the host system. In inter VM communication this might account to significant savings, and higher throughput, even more so if the VMs are running on the same host. Thus, although inter VM communication is already possible as is, there's a sacrifice in terms of CPU, which may affect the overall throughput. This series adds support for TSO in OvS-DPDK, by making use of the TSO offloading feature already supported by DPDK vhost backend, having the following scenarios in mind: - Inter VM communication on the same host; - Inter VM communication on different hosts; - The same two use cases above, but on a VLAN network. The work is based on [1]; It has been rebased to run on top of the multi-segment mbufs work (v14) [2] and re-worked to use DPDK v18.11. This patch is mostly rebased into current master a work started by Tiago Lam [3] [1] https://patchwork.ozlabs.org/patch/749564/ [2] https://mail.openvswitch.org/pipermail/ovs-dev/2019-January/355103.html [3] https://patchwork.ozlabs.org/project/openvswitch/list/?series=85807&state=* v4: - Rebase on multi-segments v15; - Fix OVN tests regression introduced in earlier patch; - Small refactor of variables names in netdev-native-tnl.c; - Fix checkpatch.py line-too-long failures introducend in earlier patch. v3: - Rebase on multi-segments v14; - Fix dp_packet_is_tso() by checking for the PKT_TX_L4_MASK offload flag as well; - In netdev_dpdk_eth_tx_burst(), revert the logic to minimize the impact for the default case (multi-segment mbufs disabled) (1/3, Ian Stokes); - Fix warnings in VLOG_WARNs for 32bits and when compiling dp_packet_is_tso() without DPDK (2/3 Ian Stokes); - Fix docs and rename netdev_dpdk_filter_packet_len() to netdev_dpdk_filter_packet() as it now filters packet based on TSO (3/3, Ian Stokes). Artur Twardowski (2): Give the variables more meaningful names Too long line split into two Michal Obrembski (1): Fix OVN failing tests. Tiago Lam (4): netdev-dpdk: Validate packets burst before Tx. netdev-dpdk: Consider packets marked for TSO. netdev-dpdk: Enable TSO when using multi-seg mbufs Performance improvements and native tnl fixes. Documentation/automake.mk | 1 + Documentation/topics/dpdk/index.rst | 1 + Documentation/topics/dpdk/tso.rst | 99 ++++++++++++++++ NEWS | 1 + lib/dp-packet.h | 34 ++++-- lib/flow.c | 81 +++++--------- lib/netdev-bsd.c | 11 +- lib/netdev-dpdk.c | 218 ++++++++++++++++++++++++++++++------ lib/netdev-dummy.c | 11 +- lib/netdev-linux.c | 15 +++ lib/netdev-native-tnl.c | 45 ++++---- 11 files changed, 395 insertions(+), 122 deletions(-) create mode 100644 Documentation/topics/dpdk/tso.rst