From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: wuzongyong@linux.alibaba.com, arnd@arndb.de, eperezma@redhat.com,
jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
virtualization@lists.linux.dev, alok.a.tiwarilinux@gmail.com
Subject: Re: [PATCH] eni_vdpa: improve IRQ error logging for config vector
Date: Mon, 17 Nov 2025 05:10:42 -0500 [thread overview]
Message-ID: <20251117050536-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20251018191502.1516313-1-alok.a.tiwari@oracle.com>
On Sat, Oct 18, 2025 at 12:15:00PM -0700, Alok Tiwari wrote:
> In eni_vdpa_request_irq(), the error message for requesting the config
> vector IRQ prints the loop index i. However, i is only valid inside the
> queue setup loop. At the point of requesting the config IRQ, i has gone
> out of scope and does not correspond to any vector, which makes the log
> misleading.
It's not that it has gone out of scope - it equals queues.
which happens to be the right thing to report:
irq = pci_irq_vector(pdev, queues);
both the code and the message are confusing though,
I agree.
> Update the error message to print the actual return code ret instead of
> the stale i value.
>
> Fixes: e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/vdpa/alibaba/eni_vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni_vdpa.c
> index e476504db0c8..e3b20ea7c423 100644
> --- a/drivers/vdpa/alibaba/eni_vdpa.c
> +++ b/drivers/vdpa/alibaba/eni_vdpa.c
> @@ -196,7 +196,7 @@ static int eni_vdpa_request_irq(struct eni_vdpa *eni_vdpa)
> ret = devm_request_irq(&pdev->dev, irq, eni_vdpa_config_handler, 0,
> eni_vdpa->msix_name, eni_vdpa);
> if (ret) {
> - ENI_ERR(pdev, "failed to request irq for config vq %d\n", i);
> + ENI_ERR(pdev, "failed to request irq for config vector ret=%d\n", ret);
you do not really need to print err it is reported up the stack.
I would probably go with:
ENI_ERR(pdev, "failed to request irq %d for config\n", queues);
> goto err;
> }
> vp_legacy_config_vector(ldev, queues);
> --
> 2.50.1
prev parent reply other threads:[~2025-11-17 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 19:15 [PATCH] eni_vdpa: improve IRQ error logging for config vector Alok Tiwari
2025-11-17 10:10 ` Michael S. Tsirkin [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=20251117050536-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alok.a.tiwari@oracle.com \
--cc=alok.a.tiwarilinux@gmail.com \
--cc=arnd@arndb.de \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=wuzongyong@linux.alibaba.com \
--cc=xuanzhuo@linux.alibaba.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.