Sync some patchs from upstreaming and modifies are as follow: - net/hns3: fix mailbox sync - net/hns3: report maximum buffer size - ethdev: add maximum Rx buffer size - app/procinfo: show RSS hash algorithm - ethdev: get RSS algorithm names - app/procinfo: adjust format of RSS info - app/procinfo: fix RSS info - net/hns3: support setting and querying RSS hash function - net/hns3: report RSS hash algorithms capability - ethdev: set and query RSS hash algorithm - ethdev: clarify RSS related fields usage - net/hns3: fix uninitialized hash algo value - net/hns3: keep set/get algo key functions local - net/hns3: fix some error logs - net/hns3: fix some return values - net/hns3: fix LRO offload to report - net/hns3: fix setting DCB capability - app/testpmd: ease configuring all offloads - net/hns3: refactor interrupt state query - net/hns3: fix IMP or global reset - net/hns3: fix multiple reset detected log - net/hns3: remove reset log in secondary - net/hns3: fix double stats for IMP and global reset - net/hns3: fix crash for NEON and SVE - net/hns3: fix unchecked Rx free threshold - net/hns3: fix typo in function name - net/hns3: fix build warning - telemetry: fix repeat display when callback don't init dict Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
77 lines
2.3 KiB
Diff
77 lines
2.3 KiB
Diff
From 0984219ef3fb85833458c14cdd99d9918febb22b Mon Sep 17 00:00:00 2001
|
|
From: Jie Hai <haijie1@huawei.com>
|
|
Date: Thu, 2 Nov 2023 16:20:16 +0800
|
|
Subject: [PATCH 388/394] app/procinfo: fix RSS info
|
|
|
|
[ 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")
|
|
Cc: stable@dpdk.org
|
|
|
|
Signed-off-by: Jie Hai <haijie1@huawei.com>
|
|
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
|
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
|
|
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
|
|
Acked-by: Huisong Li <lihuisong@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 0cc01e3dad..de7c3b4b27 100644
|
|
--- a/app/proc-info/main.c
|
|
+++ b/app/proc-info/main.c
|
|
@@ -132,6 +132,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)
|
|
@@ -823,6 +825,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)
|
|
@@ -981,17 +984,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.23.0
|
|
|