[dpdk-dev] [PATCH V15 3/3] app/testpmd: add FEC command

Ferruh Yigit ferruh.yigit at intel.com
Wed Sep 30 18:52:49 CEST 2020


On 9/29/2020 2:03 AM, Min Hu (Connor) wrote:
> This commit adds testpmd capability to query and config FEC
> function of device. This includes:
> - show FEC capabilities, example:
> 	testpmd> show port 0 fec capabilities
> - show FEC mode, example:
> 	testpmd> show port 0 fec_mode
> - config FEC mode, example:
> 	testpmd> set port <port_id> 0 <auto|off|rs|baser>
> 

I guess it is:
set port <port_id> fec_mode <auto|off|rs|baser>

> 	where:
> 
> 	auto|off|rs|baser are four kinds of FEC mode which dev
> 	support according to MAC link speed.
> 
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> Reviewed-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
> Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>
> Reviewed-by: Chengchang Tang <tangchengchang at huawei.com>
> ---
> v12->v13:
> change fec get capa interface.
> 
> ---
> v10->v11:
> change mode to capa bitmask.
> 
> ---
> v8->v9:
> added acked-by.
> 
> ---
> v6->v7:
> used RTE_DIM(fec_mode_name) instead of RTE_ETH_FEC_NUM
> 
> ---
> v5->v6:
> fixed code styles according to DPDK coding style.
> added _eth prefix.
> 
> ---
> v4->v5:
> Add RTE_ prefix for public FEC mode enum.
> 
> ---
> v3->v4:
> adjust the display format of FEC mode
> 
> ---
> v2->v3:
> adjust the display format of FEC capability.
> 
> ---
>   app/test-pmd/cmdline.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++++
>   app/test-pmd/config.c  |  91 ++++++++++++++++++++
>   app/test-pmd/testpmd.h |   2 +
>   3 files changed, 316 insertions(+)

Can you please update the testpmd documenatation for the new commands?

Also can add the new command to the --help output? ('cmd_help_long_parsed()')

<...>

> +cmdline_parse_inst_t cmd_set_fec_mode = {
> +	.f = cmd_set_port_fec_mode_parsed,
> +	.data = NULL,
> +	.help_str = "set port <port_id> fec_mode <auto|off|rs|baser>",

Can you please update the help string as:
"set port <port_id> fec_mode auto|off|rs|baser"

'<>' is to define the variable name, like in '<port_id>' you expect numbers like 
0,1,2 .. but 'auto|off|rs|baser' are keywords, not variables.


More information about the dev mailing list