From: Karra Satwik Date: Sun, 20 Dec 2020 22:47:01 +0000 (+0530) Subject: app/testpmd: fix start index for showing FEC array X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3de0881210ce974c591561da096f33a1e77c3c5f;p=dpdk.git app/testpmd: fix start index for showing FEC array 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@dpdk.org Signed-off-by: Karra Satwik Signed-off-by: Rahul Lakkireddy Acked-by: Xiaoyun Li Reviewed-by: Ferruh Yigit --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 3f6c8642b1..a6a5baa4e1 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++) { if (RTE_ETH_FEC_MODE_TO_CAPA(j) & speed_fec_capa[i].capa) printf("%s ", fec_mode_name[j].name);