DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: "Shahaf Shuler" <shahafs@mellanox.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix invalid network interface index	value
Date: Wed, 25 Jul 2018 17:04:32 +0000	[thread overview]
Message-ID: <B225667E-32EC-4140-A424-3D23F93BC88D@mellanox.com> (raw)
In-Reply-To: <20180725112249.11148-1-adrien.mazarguil@6wind.com>


> On Jul 25, 2018, at 4:24 AM, Adrien Mazarguil <adrien.mazarguil@6wind.com> wrote:
> 
> Network interface indices being unsigned, an invalid index or error is
> normally expressed through a zero value (see if_nametoindex()).
> 
> mlx5_ifindex() has a signed return type for negative values in case of
> error. Since mlx5_nl.c does not check for errors, these may be fed back as
> invalid interfaces indices to subsequent system calls. This usage would
> have been correct if mlx5_ifindex() returned a zero value instead.
> 
> This patch makes mlx5_ifindex() unsigned for convenience.
> 
> Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
> Cc: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: stable@dpdk.org
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks

  reply	other threads:[~2018-07-25 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 11:24 Adrien Mazarguil
2018-07-25 17:04 ` Yongseok Koh [this message]
2018-07-26  5:38   ` Shahaf Shuler

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=B225667E-32EC-4140-A424-3D23F93BC88D@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    /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).