MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfio_disable_msix

Function vfio_disable_msix

dpdk/lib/eal/linux/eal_interrupts.c:315–338  ·  view source on GitHub ↗

disable MSI-X interrupts */

Source from the content-addressed store, hash-verified

313
314/* disable MSI-X interrupts */
315static int
316vfio_disable_msix(const struct rte_intr_handle *intr_handle) {
317 struct vfio_irq_set *irq_set;
318 char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];
319 int len, ret, vfio_dev_fd;
320
321 len = sizeof(struct vfio_irq_set);
322
323 irq_set = (struct vfio_irq_set *) irq_set_buf;
324 irq_set->argsz = len;
325 irq_set->count = 0;
326 irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_TRIGGER;
327 irq_set->index = VFIO_PCI_MSIX_IRQ_INDEX;
328 irq_set->start = 0;
329
330 vfio_dev_fd = rte_intr_dev_fd_get(intr_handle);
331 ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
332
333 if (ret)
334 RTE_LOG(ERR, EAL, "Error disabling MSI-X interrupts for fd %d\n",
335 rte_intr_fd_get(intr_handle));
336
337 return ret;
338}
339
340#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
341/* enable req notifier */

Callers 1

rte_intr_disableFunction · 0.85

Calls 3

rte_intr_dev_fd_getFunction · 0.85
rte_intr_fd_getFunction · 0.85
ioctlFunction · 0.50

Tested by

no test coverage detected