[v8,09/10] app/proc-info: support querying RSS hash algorithm

Message ID 20231101074039.3088716-10-haijie1@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series support setting and querying RSS algorithms |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jie Hai Nov. 1, 2023, 7:40 a.m. UTC
  Display RSS hash algorithm with command show-port as below.
  - RSS info
	  -- hash algorithm : toeplitz

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 app/proc-info/main.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

lihuisong (C) Nov. 1, 2023, 10:08 a.m. UTC | #1
lgtm,
Acked-by: Huisong Li <lihuisong@huawei.com>

在 2023/11/1 15:40, Jie Hai 写道:
> Display RSS hash algorithm with command show-port as below.
>    - RSS info
> 	  -- hash algorithm : toeplitz
>
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
> ---
>   app/proc-info/main.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/app/proc-info/main.c b/app/proc-info/main.c
> index 4c577fa417fd..b672aaefbe99 100644
> --- a/app/proc-info/main.c
> +++ b/app/proc-info/main.c
> @@ -1184,6 +1184,8 @@ show_port(void)
>   				printf("%02x", rss_conf.rss_key[k]);
>   			printf("\n\t  -- hash function : 0x%"PRIx64"\n",
>   					rss_conf.rss_hf);
> +			printf("\t  -- hash algorithm : %s\n",
> +				rte_eth_dev_rss_algo_name(rss_conf.algorithm));
>   		}
>   
>   #ifdef RTE_LIB_SECURITY
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 4c577fa417fd..b672aaefbe99 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1184,6 +1184,8 @@  show_port(void)
 				printf("%02x", rss_conf.rss_key[k]);
 			printf("\n\t  -- hash function : 0x%"PRIx64"\n",
 					rss_conf.rss_hf);
+			printf("\t  -- hash algorithm : %s\n",
+				rte_eth_dev_rss_algo_name(rss_conf.algorithm));
 		}
 
 #ifdef RTE_LIB_SECURITY