All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
	Matan Barak <matanb@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	brouer@redhat.com
Subject: Re: [PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq()
Date: Wed, 10 Jan 2018 15:08:12 +0100	[thread overview]
Message-ID: <20180110150812.4ced3f5a@redhat.com> (raw)
In-Reply-To: <1515569453-63865-1-git-send-email-weiyongjun1@huawei.com>


On Wed, 10 Jan 2018 07:30:53 +0000 Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return a negative error code from the xdp_rxq_info_reg() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 539bd1d..6ba6671 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -582,7 +582,8 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
>  		goto err_rq_wq_destroy;
>  	}
>  
> -	if (xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix) < 0)
> +	err = xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix);
> +	if (err < 0)
>  		goto err_rq_wq_destroy;
>  
>  	rq->buff.map_dir = rq->xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE;

Reviewed-by: Jesper Dangaard Brouer <brouer@redhat.com>

Thanks for fixing this.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

WARNING: multiple messages have this Message-ID (diff)
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
	Matan Barak <matanb@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>,
	brouer@redhat.com
Subject: Re: [PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq()
Date: Wed, 10 Jan 2018 15:08:12 +0100	[thread overview]
Message-ID: <20180110150812.4ced3f5a@redhat.com> (raw)
In-Reply-To: <1515569453-63865-1-git-send-email-weiyongjun1@huawei.com>


On Wed, 10 Jan 2018 07:30:53 +0000 Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return a negative error code from the xdp_rxq_info_reg() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 539bd1d..6ba6671 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -582,7 +582,8 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
>  		goto err_rq_wq_destroy;
>  	}
>  
> -	if (xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix) < 0)
> +	err = xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix);
> +	if (err < 0)
>  		goto err_rq_wq_destroy;
>  
>  	rq->buff.map_dir = rq->xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE;

Reviewed-by: Jesper Dangaard Brouer <brouer@redhat.com>

Thanks for fixing this.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

  reply	other threads:[~2018-01-10 14:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  7:30 [PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq() Wei Yongjun
2018-01-10  7:30 ` Wei Yongjun
2018-01-10 14:08 ` Jesper Dangaard Brouer [this message]
2018-01-10 14:08   ` Jesper Dangaard Brouer
     [not found] ` <1515569453-63865-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-10 20:55   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2018-06-05  2:42 Wei Yongjun
2018-06-05  2:42 ` Wei Yongjun
2018-06-05  2:42 ` Wei Yongjun
2018-06-05  6:48 ` Tariq Toukan
2018-06-05  6:48   ` Tariq Toukan
2018-06-05 14:20 ` David Miller
2018-06-05 14:20   ` David Miller

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=20180110150812.4ced3f5a@redhat.com \
    --to=brouer@redhat.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matanb@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=weiyongjun1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.