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