From patchwork Thu Nov 9 10:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Hai X-Patchwork-Id: 134014 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 02BF1432E3; Thu, 9 Nov 2023 11:10:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C0FA40647; Thu, 9 Nov 2023 11:10:07 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 21CE14021F for ; Thu, 9 Nov 2023 11:10:04 +0100 (CET) Received: from kwepemd100004.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SQyPB4Q3jzfb3K; Thu, 9 Nov 2023 18:09:50 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.23; Thu, 9 Nov 2023 18:09:25 +0800 From: Jie Hai To: , , , , Tetsuya Mukawa , Huisong Li , Chengwen Feng CC: Subject: [PATCH 1/2] net/null: fix unit test fail on RSS Date: Thu, 9 Nov 2023 18:05:51 +0800 Message-ID: <20231109100552.1250123-2-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20231109100552.1250123-1-haijie1@huawei.com> References: <20231109100552.1250123-1-haijie1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemd100004.china.huawei.com (7.221.188.31) 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 ethdev uses "dev_info->hash_key_size" to check RSS configuration. So drivers should report the correct info, This patch fixes it. For more details: https://bugs.dpdk.org/show_bug.cgi?id=1308 Fixes: bae3cfa520a7 ("ethdev: clarify RSS related fields usage") Cc: stable@dpdk.org Signed-off-by: Jie Hai --- drivers/net/null/rte_eth_null.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index d742bc415c8c..7c46004f1e33 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -316,6 +316,7 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->min_rx_bufsize = 0; dev_info->reta_size = internals->reta_size; dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads; + dev_info->hash_key_size = sizeof(internals->rss_key); return 0; } From patchwork Thu Nov 9 10:05:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Hai X-Patchwork-Id: 134013 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 ECEF0432E3; Thu, 9 Nov 2023 11:10:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA60940267; Thu, 9 Nov 2023 11:10:04 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 3044B4021F for ; Thu, 9 Nov 2023 11:10:03 +0100 (CET) Received: from kwepemd100004.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SQyPB5HSQzfb3D; Thu, 9 Nov 2023 18:09:50 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.23; Thu, 9 Nov 2023 18:09:26 +0800 From: Jie Hai To: , , , , Chas Williams , "Min Hu (Connor)" , Tomasz Kulasek , Declan Doherty , Chengwen Feng , Huisong Li CC: Subject: [PATCH 2/2] app/test: fix uninitialized RSS configuration Date: Thu, 9 Nov 2023 18:05:52 +0800 Message-ID: <20231109100552.1250123-3-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20231109100552.1250123-1-haijie1@huawei.com> References: <20231109100552.1250123-1-haijie1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemd100004.china.huawei.com (7.221.188.31) 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 Since RSS algorithm has been supported, and is checked in ethdev layer, it is better to initialize "struct rte_eth_rss_conf" before congiuring RSS. Otherwise, an error will occur. Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration") Fixes: bae3cfa520a7 ("ethdev: clarify RSS related fields usage") Cc: stable@dpdk.org Signed-off-by: Jie Hai --- app/test/test_link_bonding_rssconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c index cd94e9e5dced..3c9c82433507 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -324,7 +324,7 @@ test_propagate(void) uint8_t n; struct member_conf *port; uint8_t bond_rss_key[40]; - struct rte_eth_rss_conf bond_rss_conf; + struct rte_eth_rss_conf bond_rss_conf = {0}; int retval = 0; uint64_t rss_hf = 0;