[dpdk-dev] [PATCH v2 3/3] net/mlx5: fix interrupt enable return value

Shachar Beiser shacharbe at mellanox.com
Wed Sep 6 12:54:24 CEST 2017


Hi ,

       The problem was that the value ret  was not set to 0.
        As a result we got a warning message:
	WARN("unable to arm interrupt on rx queue %d", rx_queue_id);
       The fix is ret =0;
        I was looking with Nelio for the right commits that this bug fixes I am 
pretty sure that this ret value was not initialized.

              -Shachar Beiser.

> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil at 6wind.com]
> Sent: Tuesday, September 5, 2017 4:27 PM
> To: Shachar Beiser <shacharbe at mellanox.com>
> Cc: dev at dpdk.org; Nélio Laranjeiro <nelio.laranjeiro at 6wind.com>;
> stable at dpdk.org
> Subject: Re: [PATCH v2 3/3] net/mlx5: fix interrupt enable return value
> 
> Hi Shachar,
> 
> On Tue, Sep 05, 2017 at 01:04:38PM +0000, Shachar Beiser wrote:
> > return value is sometimes returned uninitialized
> >
> > Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
> > Fixes: b18042fb8f49 ("net/mlx5: fix misplaced Rx interrupts
> > functions")
> >
> > Cc: adrien.mazarguil at 6wind.com
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Shachar Beiser <shacharbe at mellanox.com>
> 
> Looks like in both commits, ret is properly initialized so I'm wondering if the
> fixes line is right? Did you even get a compilation error?
> 
> Otherwise, you should drop this patch from the series.
> 
> > ---
> >  drivers/net/mlx5/mlx5_rxq.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> > index 437dc02..24887fb 100644
> > --- a/drivers/net/mlx5/mlx5_rxq.c
> > +++ b/drivers/net/mlx5/mlx5_rxq.c
> > @@ -1330,7 +1330,7 @@
> >  	struct priv *priv = mlx5_get_priv(dev);
> >  	struct rxq *rxq = (*priv->rxqs)[rx_queue_id];
> >  	struct rxq_ctrl *rxq_ctrl = container_of(rxq, struct rxq_ctrl, rxq);
> > -	int ret;
> > +	int ret = 0;
> >
> >  	if (!rxq || !rxq_ctrl->channel) {
> >  		ret = EINVAL;
> > --
> > 1.8.3.1
> >
> 
> --
> Adrien Mazarguil
> 6WIND


More information about the dev mailing list