patch 'app/procinfo: fix RSS info' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:08 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=df4470f94c7072597669e29e66d5d8c304f42cde

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From df4470f94c7072597669e29e66d5d8c304f42cde Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1 at huawei.com>
Date: Thu, 2 Nov 2023 16:20:16 +0800
Subject: [PATCH] app/procinfo: fix RSS info
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 33079eccf5c1a99af722fe168d8465f602bc98b2 ]

Command show-port should show RSS info (rss_key, len and rss_hf),
However, the information is shown only when rss_conf.rss_key is not
NULL. Since no memory is allocated for rss_conf.rss_key, rss_key
will always be NULL and the rss_info will never show. This patch
fixes it.

Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")

Signed-off-by: Jie Hai <haijie1 at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
Acked-by: Reshma Pattan <reshma.pattan at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
---
 app/proc-info/main.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 50871c92a0..5f7fa64dc5 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -131,6 +131,8 @@ struct desc_param {
 static struct desc_param rx_desc_param;
 static struct desc_param tx_desc_param;
 
+#define RSS_HASH_KEY_SIZE 64
+
 /* display usage */
 static void
 proc_info_usage(const char *prgname)
@@ -821,6 +823,7 @@ show_port(void)
 		struct rte_eth_fc_conf fc_conf;
 		struct rte_ether_addr mac;
 		struct rte_eth_dev_owner owner;
+		uint8_t rss_key[RSS_HASH_KEY_SIZE];
 
 		/* Skip if port is not in mask */
 		if ((enabled_port_mask & (1ul << i)) == 0)
@@ -979,17 +982,17 @@ show_port(void)
 			printf("\n");
 		}
 
+		rss_conf.rss_key = rss_key;
+		rss_conf.rss_key_len = dev_info.hash_key_size;
 		ret = rte_eth_dev_rss_hash_conf_get(i, &rss_conf);
 		if (ret == 0) {
-			if (rss_conf.rss_key) {
-				printf("  - RSS\n");
-				printf("\t  -- RSS len %u key (hex):",
-						rss_conf.rss_key_len);
-				for (k = 0; k < rss_conf.rss_key_len; k++)
-					printf(" %x", rss_conf.rss_key[k]);
-				printf("\t  -- hf 0x%"PRIx64"\n",
-						rss_conf.rss_hf);
-			}
+			printf("  - RSS\n");
+			printf("\t  -- RSS len %u key (hex):",
+					rss_conf.rss_key_len);
+			for (k = 0; k < rss_conf.rss_key_len; k++)
+				printf(" %x", rss_conf.rss_key[k]);
+			printf("\t  -- hf 0x%"PRIx64"\n",
+					rss_conf.rss_hf);
 		}
 
 #ifdef RTE_LIB_SECURITY
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:24.537430600 +0800
+++ 0043-app-procinfo-fix-RSS-info.patch	2023-12-11 17:56:22.987652300 +0800
@@ -1 +1 @@
-From 33079eccf5c1a99af722fe168d8465f602bc98b2 Mon Sep 17 00:00:00 2001
+From df4470f94c7072597669e29e66d5d8c304f42cde Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 33079eccf5c1a99af722fe168d8465f602bc98b2 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index ce53bc30df..3a441ba075 100644
+index 50871c92a0..5f7fa64dc5 100644
@@ -28 +30 @@
-@@ -151,6 +151,8 @@ struct desc_param {
+@@ -131,6 +131,8 @@ struct desc_param {
@@ -37 +39 @@
-@@ -1011,6 +1013,7 @@ show_port(void)
+@@ -821,6 +823,7 @@ show_port(void)
@@ -45 +47 @@
-@@ -1169,17 +1172,17 @@ show_port(void)
+@@ -979,17 +982,17 @@ show_port(void)


More information about the stable mailing list