From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8B3CA2EDB for ; Mon, 30 Sep 2019 10:25:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 396593423; Mon, 30 Sep 2019 10:25:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 792BC2BF1 for ; Mon, 30 Sep 2019 10:25:38 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Sep 2019 01:25:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,565,1559545200"; d="scan'208";a="215636557" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga004.fm.intel.com with ESMTP; 30 Sep 2019 01:25:35 -0700 Date: Mon, 30 Sep 2019 16:23:08 +0800 From: Ye Xiaolong To: Qi Zhang Cc: ivan.ilchenko@oktetlabs.com, arybchenko@solarflare.com, bernard.iremonger@intel.com, simei.su@intel.com, dev@dpdk.org Message-ID: <20190930082308.GC112560@intel.com> References: <20190929032209.23407-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190929032209.23407-1-qi.z.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix wrong return value 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" On 09/29, Qi Zhang wrote: >The patch fix the issue that return value in parse_vc_action_rss >be overwritten unexpectly. That cause an rte_flow creation command >with rss action does not work. > >For example: > >testpmd> flow create 0 ingress pattern eth / ipv4 / end \ >actions rss types ipv4 end / end > >We will get error "Bad Agument" > >Fixes: f5267e485a2a ("app/testpmd: check status of getting ethdev info") > >Reported-by: Simei Su >Signed-off-by: Qi Zhang >--- > app/test-pmd/cmdline_flow.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c >index 369426cbd..932bdb98e 100644 >--- a/app/test-pmd/cmdline_flow.c >+++ b/app/test-pmd/cmdline_flow.c >@@ -3549,10 +3549,11 @@ parse_vc_action_rss(struct context *ctx, const struct token *token, > if (!port_id_is_invalid(ctx->port, DISABLED_WARN) && > ctx->port != (portid_t)RTE_PORT_ALL) { > struct rte_eth_dev_info info; >+ int ret2; > >- ret = rte_eth_dev_info_get(ctx->port, &info); >- if (ret != 0) >- return ret; >+ ret2 = rte_eth_dev_info_get(ctx->port, &info); >+ if (ret2 != 0) >+ return ret2; > > action_rss_data->conf.key_len = > RTE_MIN(sizeof(action_rss_data->key), >-- >2.13.6 > Reviewed-by: Xiaolong Ye