From patchwork Mon Nov 20 11:14: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: 134478 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 ADFD34337E; Mon, 20 Nov 2023 12:14:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CD4042DD2; Mon, 20 Nov 2023 12:14:00 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 94F4C402DE for ; Mon, 20 Nov 2023 12:13:59 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SYlD75h9Nz1P6j8; Mon, 20 Nov 2023 19:10:31 +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:57 +0800 From: Huisong Li To: , , Jie Hai , Yisen Zhuang , "Min Hu (Connor)" CC: , Subject: [PATCH v2 1/3] doc/hns3: fix compilation option about max queue number Date: Mon, 20 Nov 2023 19:14:02 +0800 Message-ID: <20231120111404.37924-2-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 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 Acked-by: Jie Hai > 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 11:14:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 134479 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 BE1174337E; Mon, 20 Nov 2023 12:14:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3A4842DEE; Mon, 20 Nov 2023 12:14:02 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 80357402DE for ; Mon, 20 Nov 2023 12:14:00 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SYlHh5nPbzvQyk; Mon, 20 Nov 2023 19:13:36 +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 , Ferruh Yigit , "Min Hu (Connor)" , Hao Chen , Chunsong Feng , Chengwen Feng , Lijun Ou , "Wei Hu (Xavier)" CC: , Subject: [PATCH v2 2/3] doc/hns3: update the features for hns3 Date: Mon, 20 Nov 2023 19:14:03 +0800 Message-ID: <20231120111404.37924-3-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 Update the features for hns3. - "Basic stats" and "Extended stats" supported by Fixes: 8839c5e202f3 ("net/hns3: support device stats") - "Traffic Management API" supported by Fixes: c09c7847d892 ("net/hns3: support traffic management") - "Speed capabilities" supported by Fixes: 09e0de1f411b ("net/hns3: report speed capability for PF") - "Link Auto-negotiation" supported by Fixes: bdaf190f8235 ("net/hns3: support link speed autoneg for PF") - "Link flow control" supported by Fixes: 62e3ccc2b94c ("net/hns3: support flow control") - "Dump private info from device" supported by Fixes: 1a03c659cb9d ("net/hns3: dump device basic info") - "FW version" supported by Fixes: 1f5ca0b460cd ("net/hns3: support some device operations") Cc: stable@dpdk.org Signed-off-by: Huisong Li Acked-by: Jie Hai > 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 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 ----------