From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>, dev@dpdk.org
Cc: stable@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Chenbo Xia <chenbo.xia@intel.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, 1 Jun 2023 22:01:31 +0200 [thread overview]
Message-ID: <a21f0cff-5294-e03c-1e1c-6d7fa19724a1@redhat.com> (raw)
In-Reply-To: <20230322102325.1739053-1-boleslav.stankevich@oktetlabs.ru>
On 3/22/23 11:23, Boleslav Stankevich wrote:
> 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) {
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
prev parent reply other threads:[~2023-06-01 20:01 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
2023-06-01 20:01 ` Maxime Coquelin [this message]
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=a21f0cff-5294-e03c-1e1c-6d7fa19724a1@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=boleslav.stankevich@oktetlabs.ru \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=hyonkim@cisco.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).