On 11/30/2023 10:44 AM, Jie Hai wrote:
> Since API rte_eth_dev_rss_hash_update() supports setting RSS hash
> algorithm, add new command to support it:
>
> testpmd> port config 0 rss-hash-algo symmetric_toeplitz
>
> Signed-off-by: Jie Hai <[email protected]>
> Reviewed-by: Huisong Li <[email protected]>
> ---
> app/test-pmd/cmdline.c | 79 +++++++++++++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +++
> 2 files changed, 90 insertions(+)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 9369d3b4c526..2cd85c918a09 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -726,6 +726,10 @@ static void cmd_help_long_parsed(void *parsed_result,
> "port config port-id rss reta
> (hash,queue)[,(hash,queue)]\n"
> " Set the RSS redirection table.\n\n"
>
> + "port config port-id rss-hash-algo
> (default|simple_xor|toeplitz|"
>
Variables marked by putting them within (), so 'port-id' should be
(port_id).
<...>
> +static cmdline_parse_inst_t cmd_config_rss_hash_algo = {
> + .f = cmd_config_rss_hash_algo_parsed,
> + .data = NULL,
> + .help_str = "port config <port_id> rss-hash-algo "
> +
> "(default|simple_xor|toeplitz|symmetric_toeplitz|symmetric_toeplitz_sort)",
>
'simple_xor', 'toeplitz', etc.. are keywords, not name of variable, so
should not use (). Instead like:
"port config <port_id> rss-hash-algo default|simple_xor|..."