From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7E2EA04BC; Mon, 11 Nov 2019 05:58:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 86DD42956; Mon, 11 Nov 2019 05:58:26 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id 8E3E2235 for ; Mon, 11 Nov 2019 05:58:25 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 813C6A04BD; Mon, 11 Nov 2019 05:58:25 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Mon, 11 Nov 2019 04:58:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: santosh.rastapur@broadcom.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 361] device reset handling with igb_uio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D361 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=3D73&action=3Dedit 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/reques= t_irq igbuio_pci_release->igbuio_pci_disable_interrupts->free_irq->pci_free_irq_v= ectors 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_all= oc_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?=20 This is a hack as I am assigning "udev->info.irq =3D -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 =3D -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 =3D -EIO; goto out; } if (!idev->info->irqcontrol) { retval =3D -ENOSYS; goto out; } retval =3D idev->info->irqcontrol(idev->info, irq_on); Regards -Santosh --=20 You are receiving this mail because: You are the assignee for the bug.=