From patchwork Mon Jan 24 16:58:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 1583560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VBOq6jd9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JjGRP1MnTz9s0r for ; Tue, 25 Jan 2022 03:59:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4813C60D63; Mon, 24 Jan 2022 16:59:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C84v4A9-SHDU; Mon, 24 Jan 2022 16:59:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 8084560EBF; Mon, 24 Jan 2022 16:59:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 59478C0039; Mon, 24 Jan 2022 16:59:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0AFF2C002F for ; Mon, 24 Jan 2022 16:59:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E046F84BA6 for ; Mon, 24 Jan 2022 16:59:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0NF16YYFHttf for ; Mon, 24 Jan 2022 16:59:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 489DC84B99 for ; Mon, 24 Jan 2022 16:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643043547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XQvMtIqtSvTdVQuXqXYzt2bR4CiEMuKG/9nvA9LELH0=; b=VBOq6jd9TREkjguyGtBMbF+P9Ww4S8zxMUNGl4rApj4VE1P7rEiD+CiKPqaZenwn/baVhk kiV5s+PpNnRSJdBBwS9h1lGjKrNtbfIgm7vwMI9YJsW/q8gUCeAr/Csdm29kNj2lUVCWSG 9WuQwH8dLK6DMINVZnJW7gfRC+Xd7J0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-viLRFoZkPuy7BmbGPVJBqg-1; Mon, 24 Jan 2022 11:59:05 -0500 X-MC-Unique: viLRFoZkPuy7BmbGPVJBqg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E3F183DD3B; Mon, 24 Jan 2022 16:59:04 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id A68CB7DE4A; Mon, 24 Jan 2022 16:58:59 +0000 (UTC) From: Maxime Coquelin To: dev@openvswitch.org Date: Mon, 24 Jan 2022 17:58:29 +0100 Message-Id: <20220124165830.73060-2-maxime.coquelin@redhat.com> In-Reply-To: <20220124165830.73060-1-maxime.coquelin@redhat.com> References: <20220124165830.73060-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: fbl@sysclose.org, Maxime Coquelin , i.maximets@ovn.org, david.marchand@redhat.com Subject: [ovs-dev] [PATCH v2 1/2] vswitchd.xml: Add missing tx-steering PMD option. 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: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch documents PMD's other_config:tx-steering option. Acked-by: Kevin Traynor Signed-off-by: Maxime Coquelin --- vswitchd/vswitch.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 064e0facf..0c6632617 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -3391,6 +3391,29 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \

This option may only be used with dpdk VF representors.

+ + +

+ Specifies the Tx steering mode for the interface. +

+

+ thread enables static (1:1) thread-to-txq mapping when + the number of Tx queues is greater than number of PMD threads, and + dynamic (N:1) mapping if equal or lower. In this mode a single thread + can not use more than 1 transmit queue of a given port. +

+

+ hash enables hash-based Tx steering, which distributes + the packets on all the transmit queues based on their 5-tuples + hashes. +

+

+ Defaults to thread. +

+
+ From patchwork Mon Jan 24 16:58:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 1583561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LUia+E1l; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JjGS82RkKz9t5m for ; Tue, 25 Jan 2022 03:59:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1441984B30; Mon, 24 Jan 2022 16:59:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7q7_VS4JUfzk; Mon, 24 Jan 2022 16:59:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 64E0182716; Mon, 24 Jan 2022 16:59:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 37005C0039; Mon, 24 Jan 2022 16:59:48 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 43FA6C002F for ; Mon, 24 Jan 2022 16:59:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8B1AC40606 for ; Mon, 24 Jan 2022 16:59:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0-mPHjYVJRi7 for ; Mon, 24 Jan 2022 16:59:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id AAFD240378 for ; Mon, 24 Jan 2022 16:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643043584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kXqA5LQ/VOP6hBpy+hoEa1s1qXUb9rdReTLoP1Zuojc=; b=LUia+E1lp4OKFmA3GZT+b4sQsR4bzNZnl5HkBN80eXl1Ys43sgbd4xW9VExbEJhTHR9wS3 5lmORXP5P4IC7TkNRkQZouGnYL/oByESkDGHbT2PXbb/MwBXeQvZsmQ2ekt+m1+apIKQtu kMgTds7Bp6qNepGuIuP5all++30TAtQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-0fYEs33kNKGV1Z1CVGzO9A-1; Mon, 24 Jan 2022 11:59:41 -0500 X-MC-Unique: 0fYEs33kNKGV1Z1CVGzO9A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8888218957F3; Mon, 24 Jan 2022 16:59:40 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C5BC7DE52; Mon, 24 Jan 2022 16:59:04 +0000 (UTC) From: Maxime Coquelin To: dev@openvswitch.org Date: Mon, 24 Jan 2022 17:58:30 +0100 Message-Id: <20220124165830.73060-3-maxime.coquelin@redhat.com> In-Reply-To: <20220124165830.73060-1-maxime.coquelin@redhat.com> References: <20220124165830.73060-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: fbl@sysclose.org, Maxime Coquelin , i.maximets@ovn.org, david.marchand@redhat.com Subject: [ovs-dev] [PATCH v2 2/2] Documentation: Fix userspace Tx steering section. 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: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch fixes the thread mode part, as the static thread-to-txq mapping selection depends on whether the number of queues is strictly greater than the number of PMD threads, and anot greater or equal. The section is also reworded as per Ilya's suggestion. Fixes: c18e707b2f25 ("dpif-netdev: Introduce hash-based Tx packet steering mode.") Reported-by: Kevin Traynor Reported-by: Ilya Maximets Acked-by: Kevin Traynor Signed-off-by: Maxime Coquelin --- Documentation/topics/userspace-tx-steering.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/topics/userspace-tx-steering.rst b/Documentation/topics/userspace-tx-steering.rst index 16f066a8a..3f39eeadb 100644 --- a/Documentation/topics/userspace-tx-steering.rst +++ b/Documentation/topics/userspace-tx-steering.rst @@ -33,15 +33,16 @@ Thread mode This mode is automatically selected when the port's ``tx-steering`` option is set to ``thread`` or unset. -Depending on the port's number of Tx queues being greater or equal than the -number of PMD threads, static txq mapping or XPS will be used. +Thread mode enables static (1:1) thread-to-txq mapping when the number of Tx +queues is greater than number of PMD threads, and dynamic (N:1) mapping if +equal or lower. In this mode a single thread can not use more than 1 transmit +queue of a given port. This is the recommended mode for performance reasons if the number of Tx queues -is greater or equal to the number of PMD threads, because the Tx lock is not -acquired. +is greater than the number of PMD threads, because the Tx lock is not acquired. -If the number of Tx queues is greater than the number of threads, the remaining -Tx queues will not be used. +If the number of Tx queues is greater than the number of threads (including the +main thread), the remaining Tx queues will not be used. This mode is enabled by default.