DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: ivan.ilchenko@oktetlabs.com, arybchenko@solarflare.com,
	bernard.iremonger@intel.com, simei.su@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix wrong return value
Date: Mon, 30 Sep 2019 16:23:08 +0800	[thread overview]
Message-ID: <20190930082308.GC112560@intel.com> (raw)
In-Reply-To: <20190929032209.23407-1-qi.z.zhang@intel.com>

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 <simei.su@intel.com>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> 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 <xiaolong.ye@intel.com>

  reply	other threads:[~2019-09-30  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-29  3:22 Qi Zhang
2019-09-30  8:23 ` Ye Xiaolong [this message]
2019-09-30 14:48   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190930082308.GC112560@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ivan.ilchenko@oktetlabs.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simei.su@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).