DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: display RSS hash key of rte flow rule
@ 2023-03-16 12:58 Dongdong Liu
  2023-03-23 16:02 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Dongdong Liu @ 2023-03-16 12:58 UTC (permalink / raw)
  To: dev, ferruh.yigit, thomas, andrew.rybchenko
  Cc: stable, liudongdong3, lihuisong, Aman Singh, Yuying Zhang

From: Huisong Li <lihuisong@huawei.com>

There are two ways to set RSS hash key with rte flow rule:
1. 'key_len' isn't zero and 'key' is NULL.
2. 'key_len' isn't zero and 'key' isn't NULL.
This patch adds displaying for the hash key of rte flow rule.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 app/test-pmd/config.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 22b88c67b9..096c218c12 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1518,6 +1518,21 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
 		return;
 	}
 
+	printf(" RSS key:\n");
+	if (rss_conf->key_len == 0) {
+		printf("  none");
+	} else {
+		printf("  key_len: %u\n", rss_conf->key_len);
+		printf("  key: ");
+		if (rss_conf->key == NULL) {
+			printf("none");
+		} else {
+			for (i = 0; i < rss_conf->key_len; i++)
+				printf("%02X", rss_conf->key[i]);
+		}
+	}
+	printf("\n");
+
 	printf(" types:\n");
 	if (rss_conf->types == 0) {
 		printf("  none\n");
-- 
2.22.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] app/testpmd: display RSS hash key of rte flow rule
  2023-03-16 12:58 [PATCH] app/testpmd: display RSS hash key of rte flow rule Dongdong Liu
@ 2023-03-23 16:02 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-03-23 16:02 UTC (permalink / raw)
  To: Dongdong Liu, thomas, andrew.rybchenko
  Cc: stable, lihuisong, Aman Singh, Yuying Zhang, dev

On 3/16/2023 12:58 PM, Dongdong Liu wrote:
> From: Huisong Li <lihuisong@huawei.com>
> 
> There are two ways to set RSS hash key with rte flow rule:
> 1. 'key_len' isn't zero and 'key' is NULL.
> 2. 'key_len' isn't zero and 'key' isn't NULL.
> This patch adds displaying for the hash key of rte flow rule.
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-23 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 12:58 [PATCH] app/testpmd: display RSS hash key of rte flow rule Dongdong Liu
2023-03-23 16:02 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).