From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 082EBA0524
	for <public@inbox.dpdk.org>; Wed,  5 May 2021 21:12:30 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 15F6A41125;
	Wed,  5 May 2021 21:12:27 +0200 (CEST)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 7269B410E0;
 Wed,  5 May 2021 21:12:18 +0200 (CEST)
Received: from
 linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
 (linux.microsoft.com [13.77.154.182])
 by linux.microsoft.com (Postfix) with ESMTPSA id 38BDB20B8010;
 Wed,  5 May 2021 12:12:17 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 38BDB20B8010
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1620241937;
 bh=O9BHH+K/NCzI9CGzrQRFuT9TB03XrsHzHxuqcfP7aZI=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=Fc5wd9dEVbTbYvxUzREmKLaOCS4rznAnAR/YweuWDR7lYc7JiwDEzX7scnKBOrcs8
 3Puj6WrZ78WuLwxfnFvlrcb0abUVr6n8SkJriWXALagLpmK5ZBtm5DXLQ/ze/VeiBj
 U9ZB3ZxHLmXRvuLxH4AyGy81Rjw5JTnUjeyESWwg=
From: Jie Zhou <jizh@linux.microsoft.com>
To: dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com, roretzla@microsoft.com,
 talshn@nvidia.com, pallavi.kadam@intel.com, thomas@monjalon.net,
 bruce.richardson@intel.com, ferruh.yigit@intel.com,
 konstantin.ananyev@intel.com, stable@dpdk.org
Date: Wed,  5 May 2021 12:12:07 -0700
Message-Id: <1620241931-28435-7-git-send-email-jizh@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1620241931-28435-1-git-send-email-jizh@linux.microsoft.com>
References: <1620236174-10676-1-git-send-email-jizh@linux.microsoft.com>
 <1620241931-28435-1-git-send-email-jizh@linux.microsoft.com>
Subject: [dpdk-stable] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode
 return type name
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0268b18f9..dff5a75ec 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 01a541cdd..e2e1a31f2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3614,13 +3614,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 283b5e368..9ae4d90dd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2