app/testpmd: display RSS hash key of rte flow rule

Message ID 20230316125814.723-1-liudongdong3@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: display RSS hash key of rte flow rule |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Dongdong Liu March 16, 2023, 12:58 p.m. UTC
  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(+)
  

Comments

Ferruh Yigit March 23, 2023, 4:02 p.m. UTC | #1
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.
  

Patch

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");