From patchwork Mon Nov 20 11:14:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 134480 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BE0E4337E; Mon, 20 Nov 2023 12:14:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C43742DF3; Mon, 20 Nov 2023 12:14:04 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 9F5F442DDE for ; Mon, 20 Nov 2023 12:14:00 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SYlD90nHBz1P8bh; Mon, 20 Nov 2023 19:10:33 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 20 Nov 2023 19:13:58 +0800 From: Huisong Li To: , , Jie Hai , Yisen Zhuang , "Min Hu (Connor)" CC: , Subject: [PATCH v2 3/3] doc/hns3: fix the usage description for RSS flow Date: Mon, 20 Nov 2023 19:14:04 +0800 Message-ID: <20231120111404.37924-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231120111404.37924-1-lihuisong@huawei.com> References: <20231120111404.37924-1-lihuisong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The hns3 driver supports for creating rule base on input tuple, hash key, queues and hash algorithm. But hash key, queues and hash algorithm are the global configuration for hardware which will affect other rules. The rule just setting input tuple is completely independent. Fixes: 63a0f65c9572 ("doc: add more description in hns3 guide") Cc: stable@dpdk.org Signed-off-by: Huisong Li Acked-by: Jie Hai > Signed-off-by: Huisong Li --- doc/guides/nics/hns3.rst | 42 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst index 11d0c04884..e260b301a8 100644 --- a/doc/guides/nics/hns3.rst +++ b/doc/guides/nics/hns3.rst @@ -239,36 +239,50 @@ Generic flow API - ``RSS Flow`` - RSS Flow supports to set hash input set, hash function, enable hash - and configure queues. - For example: - Configure queues as queue 0, 1, 2, 3. + RSS Flow supports for creating rule base on input tuple, hash key, queues + and hash algorithm. But hash key, queues and hash algorithm are the global + configuration for hardware which will affect other rules. The rule just + setting input tuple is completely independent. + + Run ``testpmd``: .. code-block:: console - testpmd> flow create 0 ingress pattern end actions rss types end \ - queues 0 1 2 3 end / end + dpdk-testpmd -a 0000:7d:00.0 -l 10-18 -- -i --rxq=8 --txq=8 + + All IP packets can be distributed to 8 queues. - Enable hash and set input set for IPv4-TCP. + Set ipv4-tcp packet is distributed to 8 queues based on L3/L4 SRC only. .. code-block:: console - testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \ - actions rss types ipv4-tcp l3-src-only end queues end / end + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions \ + rss types ipv4-tcp l4-src-only l3-src-only end queues end / end - Set symmetric hash enable for flow type IPv4-TCP. + Disable ipv4 packet RSS hash. .. code-block:: console - testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \ - actions rss types ipv4-tcp end queues end func symmetric_toeplitz / end + testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss \ + types none end queues end / end - Set hash function as simple xor. + Set hash function as symmetric toeplitz. .. code-block:: console testpmd> flow create 0 ingress pattern end actions rss types end \ - queues end func simple_xor / end + queues end func symmetric_toeplitz / end + + In this case, all packets that enabled RSS are hashed using symmetric + toeplitz algorithm. + + Flush all RSS rules + + .. code-block:: console + + testpmd> flow flush 0 + + The RSS configurations of hardwre is back to the one ethdev ops set. Statistics ----------