Skip to content

Commit

Permalink
app/testpmd: fix start index for showing FEC array
Browse files Browse the repository at this point in the history
[ upstream commit 3de0881 ]

Start from index 0 when going through the FEC array. This will allow
"off" to get printed for RTE_ETH_FEC_NOFEC mode.

Fixes: b19da32 ("app/testpmd: add FEC command")

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
Karra Satwik authored and bluca committed Feb 4, 2021
1 parent ff1e5f3 commit d616d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test-pmd/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d616d66

Please sign in to comment.