From patchwork Sun Dec 20 22:47:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Lakkireddy X-Patchwork-Id: 85566 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36B95A09FD; Mon, 21 Dec 2020 00:03:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A32DCB76; Mon, 21 Dec 2020 00:03:26 +0100 (CET) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 90DF1CACA; Mon, 21 Dec 2020 00:03:23 +0100 (CET) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 0BKN3JXk011874; Sun, 20 Dec 2020 15:03:20 -0800 From: Rahul Lakkireddy To: dev@dpdk.org Cc: kaara.satwik@chelsio.com, stable@dpdk.org Date: Mon, 21 Dec 2020 04:17:01 +0530 Message-Id: <1608504422-29220-1-git-send-email-rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 Subject: [dpdk-dev] [PATCH] app/testpmd: fix start index for showing FEC array X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Karra Satwik 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 --- 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++) { if (RTE_ETH_FEC_MODE_TO_CAPA(j) & speed_fec_capa[i].capa) printf("%s ", fec_mode_name[j].name);