[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220110051851.84807-5-lingshan.zhu@intel.com>
Date: Mon, 10 Jan 2022 13:18:48 +0800
From: Zhu Lingshan <lingshan.zhu@...el.com>
To: jasowang@...hat.com, mst@...hat.com
Cc: netdev@...r.kernel.org, Zhu Lingshan <lingshan.zhu@...el.com>
Subject: [PATCH 4/7] vDPA/ifcvf: implement shared irq handlers for vqs
It has observed that a device may fail to alloc enough vectors on
some platforms, e.g., requires 16 vectors, but only 2 or 4 vector
slots allocated. The virt queues have to share a vector/irq under
such circumstances.
This irq handlers has to kick every queue because it is not
possible to tell which queue triggers the interrupt.
Signed-off-by: Zhu Lingshan <lingshan.zhu@...el.com>
---
drivers/vdpa/ifcvf/ifcvf_main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 64fc78eaa1a9..19e1d1cd71a3 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -37,6 +37,21 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
return IRQ_HANDLED;
}
+static irqreturn_t ifcvf_shared_intr_handler(int irq, void *arg)
+{
+ struct ifcvf_hw *vf = arg;
+ struct vring_info *vring;
+ int i;
+
+ for (i = 0; i < vf->nr_vring; i++) {
+ vring = &vf->vring[i];
+ if (vring->cb.callback)
+ vf->vring->cb.callback(vring->cb.private);
+ }
+
+ return IRQ_HANDLED;
+}
+
static void ifcvf_free_irq_vectors(void *data)
{
pci_free_irq_vectors(data);
--
2.27.0
Powered by blists - more mailing lists