app/testpmd: display RSS hash key of rte flow rule
Checks
Commit Message
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
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.
@@ -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");