patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	David Marchand <david.marchand@redhat.com>,
	Hyong Youb Kim <hyonkim@cisco.com>,
	Harman Kalra <hkalra@marvell.com>
Subject: RE: [PATCH 1/2] net/virtio: propagate return value of called function
Date: Thu, 11 May 2023 08:19:50 +0000	[thread overview]
Message-ID: <SN6PR11MB3504FAC8FDC645C24DBDCD179C749@SN6PR11MB3504.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230322102325.1739053-1-boleslav.stankevich@oktetlabs.ru>

> -----Original Message-----
> From: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
> Sent: Wednesday, March 22, 2023 6:23 PM
> To: dev@dpdk.org
> Cc: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>;
> stable@dpdk.org; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Maxime
> Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo <chenbo.xia@intel.com>;
> David Marchand <david.marchand@redhat.com>; Hyong Youb Kim
> <hyonkim@cisco.com>; Harman Kalra <hkalra@marvell.com>
> Subject: [PATCH 1/2] net/virtio: propagate return value of called function
> 
> rte_intr_vec_list_alloc() may fail because of different reasons which
> are indicated by different negative errno values.
> 
> Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index ae84d313be..5c8b7b95e9 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1390,6 +1390,7 @@ static int
>  virtio_configure_intr(struct rte_eth_dev *dev)
>  {
>  	struct virtio_hw *hw = dev->data->dev_private;
> +	int ret;
> 
>  	if (!rte_intr_cap_multiple(dev->intr_handle)) {
>  		PMD_INIT_LOG(ERR, "Multiple intr vector not supported");
> @@ -1401,11 +1402,12 @@ virtio_configure_intr(struct rte_eth_dev *dev)
>  		return -1;
>  	}
> 
> -	if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
> -				    hw->max_queue_pairs)) {
> +	ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
> +				      hw->max_queue_pairs);
> +	if (ret < 0) {
>  		PMD_INIT_LOG(ERR, "Failed to allocate %u rxq vectors",
>  			     hw->max_queue_pairs);
> -		return -ENOMEM;
> +		return ret;
>  	}
> 
>  	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
> --
> 2.30.2

I assume the mailmap warning should be fixed when merging. So:

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> 

  parent reply	other threads:[~2023-05-11  8:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 10:23 Boleslav Stankevich
2023-03-22 10:23 ` [PATCH 2/2] net/virtio: fix device init to return negative errno Boleslav Stankevich
2023-05-11  8:20   ` Xia, Chenbo
2023-06-01 20:01   ` Maxime Coquelin
2023-03-28  3:14 ` [PATCH 1/2] net/virtio: propagate return value of called function Xia, Chenbo
2023-03-30  7:13   ` Andrew Rybchenko
2023-05-11  8:19 ` Xia, Chenbo [this message]
2023-06-01 20:01 ` Maxime Coquelin

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=SN6PR11MB3504FAC8FDC645C24DBDCD179C749@SN6PR11MB3504.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=boleslav.stankevich@oktetlabs.ru \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=hyonkim@cisco.com \
    --cc=maxime.coquelin@redhat.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).