From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 361] device reset handling with igb_uio
Date: Mon, 11 Nov 2019 04:58:23 +0000 [thread overview]
Message-ID: <bug-361-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=361
Bug ID: 361
Summary: device reset handling with igb_uio
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: santosh.rastapur@broadcom.com
Target Milestone: ---
Created attachment 73
--> https://bugs.dpdk.org/attachment.cgi?id=73&action=edit
msi-x vector allocation for igb_uio after device reset
Hi,
I have a question on igb_uio.
From the below function call traces, vfio-pci module frees/allocates msi-x
vector table as part of
interrupt disable/enable. Where as igb-uio module, only masks/unmasks the
msi-x interrupt.
Does this mean, when using igb_uio, device can't undergo reset which clears
MSI-X vector table?
How to handle device reset with igb_uio?
igb-uio:
rte_intr_disable->uio_intr_disable->igbuio_pci_irqcontrol->pci_msi_mask_irq
rte_intr_enable->uio_intr_enable->igbuio_pci_irqcontrol->pci_msi_unmask_irq
igbuio_pci_open->igbuio_pci_enable_interrupts->pci_alloc_irq_vectors/request_irq
igbuio_pci_release->igbuio_pci_disable_interrupts->free_irq->pci_free_irq_vectors
vfio-pci:
rte_intr_disable->vfio_disable_msix->vfio_pci_ioctl->vfio_msi_disable->pci_free_irq_vectors
rte_intr_enable->vfio_enable_msix->vfio_pci_ioctl->vfio_msi_enable->pci_alloc_irq_vectors/vfio_msi_set_vector_signal->request_irq
I am using the attached hack to overcome this. What is the correct way to
handle this?
This is a hack as I am assigning "udev->info.irq = -1" when interrupt is
disabled to prevent uio_write from exiting.
kernel/linux/igb_uio/igb_uio.c: igbuio_pci_irqcontrol
igbuio_pci_disable_interrupts(udev);
udev->info.irq = -1; <-- Assigning to -1 and not 0.
Basically uio_write will not call igbuio_pci_enable_interrupts to enable the
interrupts back if irq is 0.
drivers/uio/uio.c: uio_write
if (!idev->info->irq) {
retval = -EIO;
goto out;
}
if (!idev->info->irqcontrol) {
retval = -ENOSYS;
goto out;
}
retval = idev->info->irqcontrol(idev->info, irq_on);
Regards
-Santosh
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2019-11-11 4:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 4:58 bugzilla [this message]
2019-11-13 6:16 ` [dpdk-dev] [Bug 361] device reset handling with igb_uio bugzilla
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=bug-361-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@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