From patchwork Mon Jan 20 13:09:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciara Loftus X-Patchwork-Id: 1225956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481X8J1xkZz9sSY for ; Tue, 21 Jan 2020 00:10:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6DF8784FDD; Mon, 20 Jan 2020 13:10:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jyDSS_HrItcU; Mon, 20 Jan 2020 13:10:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2FD8D845E0; Mon, 20 Jan 2020 13:10:01 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0916AC0178; Mon, 20 Jan 2020 13:10:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DAC4FC0174 for ; Mon, 20 Jan 2020 13:09:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D740286361 for ; Mon, 20 Jan 2020 13:09:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TqzNCWTTJsJR for ; Mon, 20 Jan 2020 13:09:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by hemlock.osuosl.org (Postfix) with ESMTPS id 756CF87111 for ; Mon, 20 Jan 2020 13:09:53 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jan 2020 05:09:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,342,1574150400"; d="scan'208";a="219648171" Received: from silpixa00399839.ir.intel.com (HELO silpixa00399839.ger.corp.intel.com) ([10.237.223.27]) by orsmga008.jf.intel.com with ESMTP; 20 Jan 2020 05:09:51 -0800 From: Ciara Loftus To: dev@openvswitch.org, fbl@sysclose.org, ian.stokes@intel.com Date: Mon, 20 Jan 2020 13:09:36 +0000 Message-Id: <20200120130936.21050-1-ciara.loftus@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [ovs-dev] [PATCH v3] Documentation: add notes for TSO & i40e X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" When using TSO in OVS-DPDK with an i40e device, the following patch is required for DPDK, which fixes an issue on the TSO path: https://patches.dpdk.org/patch/64136/ Document this as a limitation until a DPDK release with the fix included is supported by OVS. Also, document best known methods for performance tuning when testing TSO with the tool iperf. Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support") Signed-off-by: Ciara Loftus Acked-by: Flavio Leitner --- v3: - Added Fixes tag - Removed unwanted manpages.mk change v2: - rebased to master - changed patch links from net-next tree to patchwork --- Documentation/topics/userspace-tso.rst | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/topics/userspace-tso.rst b/Documentation/topics/userspace-tso.rst index 893c64839..94eddc0b2 100644 --- a/Documentation/topics/userspace-tso.rst +++ b/Documentation/topics/userspace-tso.rst @@ -96,3 +96,30 @@ datapath must support TSO or packets using that feature will be dropped on ports without TSO support. That also means guests using vhost-user in client mode will receive TSO packet regardless of TSO being enabled or disabled within the guest. + +When the NIC performing the segmentation is using the i40e DPDK PMD, a fix +must be included in the DPDK build, otherwise TSO will not work. The fix can +be found on `DPDK patchwork`__. + +__ https://patches.dpdk.org/patch/64136/ + +This fix is expected to be included in the 19.11.1 release. When OVS migrates +to this DPDK release, this limitation can be removed. + +~~~~~~~~~~~~~~~~~~ +Performance Tuning +~~~~~~~~~~~~~~~~~~ + +iperf is often used to test TSO performance. Care needs to be taken when +configuring the environment in which the iperf server process is being run. +Since the iperf server uses the NIC's kernel driver, IRQs will be generated. +By default with some NICs eg. i40e, the IRQs will land on the same core as that +which is being used by the server process, provided the number of NIC queues is +greater or equal to that lcoreid. This causes contention between the iperf +server process and the IRQs. For optimal performance, it is suggested to pin +the IRQs to their own core. To change the affinity associated with a given IRQ +number, you can 'echo' the desired coremask to the file +/proc/irq//smp_affinity +For more on SMP affinity, refer to the `Linux kernel documentation`__. + +__ https://www.kernel.org/doc/Documentation/IRQ-affinity.txt