From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 61E33A0546; Fri, 30 Apr 2021 19:53:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C1014115E; Fri, 30 Apr 2021 19:52:58 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7DE034014F for ; Fri, 30 Apr 2021 19:52:48 +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 75D3220B8013; Fri, 30 Apr 2021 10:52:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 75D3220B8013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1619805167; bh=FjNmtK/6n31MwWiQa65E2W8xzpzunfPtHNNvVbbUiPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bAkzPfSqf7fjsUIKrgwdxA5hTQIeluRdoYDgsXxZrGbEJHGfGQDmX9A8hSQZGv/zW sanA7qVw2JQgofUxwxJEDc26mRY4BZpaFhYrrJsGoCMqswcGNr5k1zOGcdphLJWhhX eB9ekwjlcbIUW1Mnh8s/aLnFBhhFXCP5q05kHdvE= From: Jie Zhou 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 Date: Fri, 30 Apr 2021 10:52:38 -0700 Message-Id: <1619805162-10684-7-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com> References: <1619553721-5220-1-git-send-email-jizh@linux.microsoft.com> <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Fix parse_fec_mode to return fec_capa instead of mode Signed-off-by: Jie Zhou Signed-off-by: Jie Zhou --- 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 12efbc0ca..d804ee233 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -16984,17 +16984,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 0e86ed02f..c626d5ce8 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3549,13 +3549,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 6ca872db8..1d104213b 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -886,7 +886,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