patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <>
To: Sarosh Arif <>
Subject: Re: [dpdk-stable] [PATCH] examples: fix return value of function that parses portmask
Date: Sat, 11 Jul 2020 12:00:58 +0200
Message-ID: <2105820.9fF9r4LGxE@thomas> (raw)
In-Reply-To: <>

Why nobody reviewed? Isn't there some maintainers of example apps?

11/06/2020 14:36, Sarosh Arif:
> Giving invalid or zero portmask as command line option to 
> these applications will have an unexpected response.
> The reason behind this is that the return value of function
> that parses portmask is stored in a variable whose datatype is 
> unsigned int, hence returning -1 in case of zero or
> invalid portmask causes an unexpected behaviour. 

After looking at few examples, the function returns a signed int.

> If we return 0 instead of -1 this issue can be resolved.

Yes, the caller of the function seems to expect 0 as error value.

> The program already contains the functionality to print
> "invalid portmask" and program usage if zero is returned.
> Signed-off-by: Sarosh Arif <>

  reply	other threads:[~2020-07-11 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 12:36 Sarosh Arif
2020-07-11 10:00 ` Thomas Monjalon [this message]
2020-07-21 16:07 ` Bruce Richardson
2020-07-30 21:08   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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:

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

  git send-email \
    --in-reply-to=2105820.9fF9r4LGxE@thomas \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone