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

Function vfio_disable_req

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

disable req notifier */

Source from the content-addressed store, hash-verified

373
374/* disable req notifier */
375static int
376vfio_disable_req(const struct rte_intr_handle *intr_handle)
377{
378 struct vfio_irq_set *irq_set;
379 char irq_set_buf[IRQ_SET_BUF_LEN];
380 int len, ret, vfio_dev_fd;
381
382 len = sizeof(struct vfio_irq_set);
383
384 irq_set = (struct vfio_irq_set *) irq_set_buf;
385 irq_set->argsz = len;
386 irq_set->count = 0;
387 irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_TRIGGER;
388 irq_set->index = VFIO_PCI_REQ_IRQ_INDEX;
389 irq_set->start = 0;
390
391 vfio_dev_fd = rte_intr_dev_fd_get(intr_handle);
392 ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
393
394 if (ret)
395 RTE_LOG(ERR, EAL, "Error disabling req interrupts for fd %d\n",
396 rte_intr_fd_get(intr_handle));
397
398 return ret;
399}
400#endif
401#endif
402

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