From patchwork Mon Nov 20 07:55:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 134473 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 AE8BA4337B; Mon, 20 Nov 2023 08:55:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CE1942DC4; Mon, 20 Nov 2023 08:55:02 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 9665C42DB6 for ; Mon, 20 Nov 2023 08:54:59 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SYfn26y6FzMnD6; Mon, 20 Nov 2023 15:50:14 +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 15:54:55 +0800 From: Huisong Li To: , , Jie Hai , Yisen Zhuang , "Min Hu (Connor)" CC: , Subject: [PATCH 1/3] doc/hns3: fix compilation option about max queue number Date: Mon, 20 Nov 2023 15:55:00 +0800 Message-ID: <20231120075502.15844-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231120075502.15844-1-lihuisong@huawei.com> References: <20231120075502.15844-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 This patch fixes the description of compilation option about setting max queue number. The maximum queue number of HIP09 and HIP10 is determined by the RTE_LIBRTE_HNS3_MAX_TQP_NUM_PER_PF and the value the firmware report. Fixes: 21938cf4e43e ("doc: add build config option in hns3 guide") Cc: stable@dpdk.org Signed-off-by: Huisong Li --- doc/guides/nics/hns3.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst index ee774639d3..7eac1b3c92 100644 --- a/doc/guides/nics/hns3.rst +++ b/doc/guides/nics/hns3.rst @@ -69,7 +69,8 @@ The following options can be modified in the ``config/rte_config.h`` file. - ``RTE_LIBRTE_HNS3_MAX_TQP_NUM_PER_PF`` (default ``256``) - Number of MAX queues reserved for PF. + Number of MAX queues reserved for PF on HIP09 and HIP10. The MAX queue + number is also determined by the value the firmware report. Runtime Configuration ~~~~~~~~~~~~~~~~~~~~~ From patchwork Mon Nov 20 07:55:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 134472 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 AB6FB4337B; Mon, 20 Nov 2023 08:54:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 798FC42DB2; Mon, 20 Nov 2023 08:54:59 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 5E51840266 for ; Mon, 20 Nov 2023 08:54:58 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SYfpT6dgFzsR4B; Mon, 20 Nov 2023 15:51:29 +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 15:54:56 +0800 From: Huisong Li To: , , Jie Hai , Yisen Zhuang CC: , Subject: [PATCH 2/3] doc/hns3: update the features for hns3 Date: Mon, 20 Nov 2023 15:55:01 +0800 Message-ID: <20231120075502.15844-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231120075502.15844-1-lihuisong@huawei.com> References: <20231120075502.15844-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 Update the features for hns3. Signed-off-by: Huisong Li --- doc/guides/nics/hns3.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst index 7eac1b3c92..11d0c04884 100644 --- a/doc/guides/nics/hns3.rst +++ b/doc/guides/nics/hns3.rst @@ -30,7 +30,6 @@ Features of the HNS3 PMD are: - DCB - Scattered and gather for TX and RX - Vector Poll mode driver -- Dump register - SR-IOV VF - Multi-process - MAC/VLAN filter @@ -38,6 +37,15 @@ Features of the HNS3 PMD are: - NUMA support - Generic flow API - IEEE1588/802.1AS timestamping +- Basic stats +- Extended stats +- Traffic Management API +- Speed capabilities +- Link Auto-negotiation +- Link flow control +- Dump register +- Dump private info from device +- FW version Prerequisites ------------- From patchwork Mon Nov 20 07:55:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 134474 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 BE8234337B; Mon, 20 Nov 2023 08:55:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DD7342DCD; Mon, 20 Nov 2023 08:55:03 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 24F4740266 for ; Mon, 20 Nov 2023 08:54:58 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SYfpV3QkwzsRKp; Mon, 20 Nov 2023 15:51:30 +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 15:54:56 +0800 From: Huisong Li To: , , Jie Hai , Yisen Zhuang , "Min Hu (Connor)" CC: , Subject: [PATCH 3/3] doc/hns3: fix the usage description for RSS flow Date: Mon, 20 Nov 2023 15:55:02 +0800 Message-ID: <20231120075502.15844-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231120075502.15844-1-lihuisong@huawei.com> References: <20231120075502.15844-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 --- 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 ----------