[dpdk-dev] [PATCH] net/mlx5: fix invalid network interface index value

Shahaf Shuler shahafs at mellanox.com
Thu Jul 26 07:38:41 CEST 2018


Wednesday, July 25, 2018 8:05 PM, Yongseok Koh:
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix invalid network interface
> index value
> 
> 
> > On Jul 25, 2018, at 4:24 AM, Adrien Mazarguil
> <adrien.mazarguil at 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 at 6wind.com>
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> > Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
> > ---
> Acked-by: Yongseok Koh <yskoh at mellanox.com>

Applied to next-net-mlx, thanks. 

> 
> Thanks


More information about the dev mailing list