[PATCH V2 2/2] app/testpmd: unify RSS types display

Huisong Li lihuisong at huawei.com
Fri Apr 29 12:24:45 CEST 2022


Unify RSS types display.

Signed-off-by: Huisong Li <lihuisong at huawei.com>
---
 app/test-pmd/config.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cc47db3690..1d9ac4a038 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1525,13 +1525,7 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
 		printf("  none\n");
 		return;
 	}
-	for (i = 0; rss_type_table[i].str; i++) {
-		if ((rss_conf->types &
-		    rss_type_table[i].rss_type) ==
-		    rss_type_table[i].rss_type &&
-		    rss_type_table[i].rss_type != 0)
-			printf("  %s\n", rss_type_table[i].str);
-	}
+	show_rss_types(rss_conf->types);
 }
 
 static struct port_indirect_action *
@@ -3731,13 +3725,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 		return;
 	}
 	printf("RSS functions:\n ");
-	for (i = 0; rss_type_table[i].str; i++) {
-		if (rss_type_table[i].rss_type == 0)
-			continue;
-		if ((rss_hf & rss_type_table[i].rss_type) == rss_type_table[i].rss_type)
-			printf("%s ", rss_type_table[i].str);
-	}
-	printf("\n");
+	show_rss_types(rss_hf);
 	if (!show_rss_key)
 		return;
 	printf("RSS key:\n");
-- 
2.33.0



More information about the dev mailing list