[dpdk-dev] [PATCH] app/testpmd: fix start index for showing FEC array
Min Hu (Connor)
humin29 at huawei.com
Mon Dec 21 10:07:21 CET 2020
在 2020/12/21 6:47, Rahul Lakkireddy 写道:
> From: Karra Satwik <kaara.satwik at chelsio.com>
>
> Start from index 0 when going through the FEC array. This will allow
> "off" to get printed for RTE_ETH_FEC_NOFEC mode.
>
> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> Cc: stable at dpdk.org
>
> Signed-off-by: Karra Satwik <kaara.satwik at chelsio.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
> ---
> app/test-pmd/config.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 3f6c8642b..a6a5baa4e 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
> printf("%s : ",
> rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
>
> - for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
> + for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
As RTE_ETH_FEC_NOFEC is mode which every device has, so we think it
should not be regarged as "capabilities".
Thanks.
> if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
> speed_fec_capa[i].capa)
> printf("%s ", fec_mode_name[j].name);
>
More information about the dev
mailing list