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

Function vfio_disable_msi

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

disable MSI interrupts */

Source from the content-addressed store, hash-verified

247
248/* disable MSI interrupts */
249static int
250vfio_disable_msi(const struct rte_intr_handle *intr_handle) {
251 struct vfio_irq_set *irq_set;
252 char irq_set_buf[IRQ_SET_BUF_LEN];
253 int len, ret, vfio_dev_fd;
254
255 len = sizeof(struct vfio_irq_set);
256
257 irq_set = (struct vfio_irq_set *) irq_set_buf;
258 irq_set->argsz = len;
259 irq_set->count = 0;
260 irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_TRIGGER;
261 irq_set->index = VFIO_PCI_MSI_IRQ_INDEX;
262 irq_set->start = 0;
263
264 vfio_dev_fd = rte_intr_dev_fd_get(intr_handle);
265 ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
266 if (ret)
267 RTE_LOG(ERR, EAL, "Error disabling MSI interrupts for fd %d\n",
268 rte_intr_fd_get(intr_handle));
269
270 return ret;
271}
272
273/* enable MSI-X interrupts */
274static int

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