patch 'app/testpmd: fix supported RSS offload display' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Wed Jul 20 10:21:24 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/22/22. 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://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/88660d765353a6369ab0e37126b26b7387c3797e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Wed, 29 Jun 2022 16:34:44 +0800
Subject: [PATCH] app/testpmd: fix supported RSS offload display
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ]

The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of
RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to
dev_info->flow_type_rss_offloads. testpmd will display "user defined 63"
when run 'show port info 0'. Because testpmd use flowtype_to_str()
to display the supported RSS offload of PMD. In fact, the function is
used to display flow type in FDIR commands for i40e or ixgbe. This patch
uses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD.

Fixes: b12964f621dc ("ethdev: unification of RSS offload types")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at xilinx.com>
---
 app/test-pmd/config.c  | 36 ++++++++++++++++++++++++------------
 app/test-pmd/testpmd.h |  2 ++
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d24fb7763e..f3ffc23ecd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -63,8 +63,6 @@
 
 #define NS_PER_SEC 1E9
 
-static char *flowtype_to_str(uint16_t flow_type);
-
 static const struct {
 	enum tx_pkt_split split;
 	const char *name;
@@ -566,6 +564,19 @@ skip_parse:
 	};
 }
 
+const char *
+rsstypes_to_str(uint64_t rss_type)
+{
+	uint16_t i;
+
+	for (i = 0; rss_type_table[i].str != NULL; i++) {
+		if (rss_type_table[i].rss_type == rss_type)
+			return rss_type_table[i].str;
+	}
+
+	return NULL;
+}
+
 void
 port_infos_display(portid_t port_id)
 {
@@ -668,19 +679,20 @@ port_infos_display(portid_t port_id)
 	if (!dev_info.flow_type_rss_offloads)
 		printf("No RSS offload flow type is supported.\n");
 	else {
+		uint64_t rss_offload_types = dev_info.flow_type_rss_offloads;
 		uint16_t i;
-		char *p;
 
 		printf("Supported RSS offload flow types:\n");
-		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
-		     i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) {
-			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
-				continue;
-			p = flowtype_to_str(i);
-			if (p)
-				printf("  %s\n", p);
-			else
-				printf("  user defined %d\n", i);
+		for (i = 0; i < sizeof(rss_offload_types) * CHAR_BIT; i++) {
+			uint64_t rss_offload = UINT64_C(1) << i;
+			if ((rss_offload_types & rss_offload) != 0) {
+				const char *p = rsstypes_to_str(rss_offload);
+				if (p)
+					printf("  %s\n", p);
+				else
+					printf("  user defined %u\n",
+					       i);
+			}
 		}
 	}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 745e673b8d..d21d8501d5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
 void add_tx_dynf_callback(portid_t portid);
 void remove_tx_dynf_callback(portid_t portid);
 int update_jumbo_frame_offload(portid_t portid);
+const char *rsstypes_to_str(uint64_t rss_type);
+
 
 /*
  * Work-around of a compilation error with ICC on invocations of the
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.343388684 +0800
+++ 0055-app-testpmd-fix-supported-RSS-offload-display.patch	2022-07-20 15:00:58.797667023 +0800
@@ -1 +1 @@
-From 3c23ee6cdddf28641f52f31ced84d3feb867027c Mon Sep 17 00:00:00 2001
+From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
- app/test-pmd/config.c  | 40 ++++++++++++++++++++++++++--------------
+ app/test-pmd/config.c  | 36 ++++++++++++++++++++++++------------
@@ -22 +24 @@
- 2 files changed, 28 insertions(+), 14 deletions(-)
+ 2 files changed, 26 insertions(+), 12 deletions(-)
@@ -25 +27 @@
-index 62833fe97c..a1183ad18e 100644
+index d24fb7763e..f3ffc23ecd 100644
@@ -28 +30 @@
-@@ -66,8 +66,6 @@
+@@ -63,8 +63,6 @@
@@ -37,2 +39,2 @@
-@@ -675,6 +673,19 @@ print_dev_capabilities(uint64_t capabilities)
- 	}
+@@ -566,6 +564,19 @@ skip_parse:
+ 	};
@@ -57 +59 @@
-@@ -779,19 +790,20 @@ port_infos_display(portid_t port_id)
+@@ -668,19 +679,20 @@ port_infos_display(portid_t port_id)
@@ -76 +78 @@
-+			uint64_t rss_offload = RTE_BIT64(i);
++			uint64_t rss_offload = UINT64_C(1) << i;
@@ -88,18 +89,0 @@
-@@ -5604,6 +5616,8 @@ set_record_burst_stats(uint8_t on_off)
- 	record_burst_stats = on_off;
- }
- 
-+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-+
- static char*
- flowtype_to_str(uint16_t flow_type)
- {
-@@ -5647,8 +5661,6 @@ flowtype_to_str(uint16_t flow_type)
- 	return NULL;
- }
- 
--#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
--
- static inline void
- print_fdir_mask(struct rte_eth_fdir_masks *mask)
- {
@@ -107 +91 @@
-index eeefb5e70f..195488b602 100644
+index 745e673b8d..d21d8501d5 100644
@@ -110,4 +94,4 @@
-@@ -1199,6 +1199,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size,
- 		      struct rte_flow_item **pattern,
- 		      struct rte_flow_action **actions);
- 
+@@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
+ void add_tx_dynf_callback(portid_t portid);
+ void remove_tx_dynf_callback(portid_t portid);
+ int update_jumbo_frame_offload(portid_t portid);
@@ -116,3 +100,3 @@
- /* For registering driver specific testpmd commands. */
- struct testpmd_driver_commands {
- 	TAILQ_ENTRY(testpmd_driver_commands) next;
+ 
+ /*
+  * Work-around of a compilation error with ICC on invocations of the


More information about the stable mailing list