disable MSI-X interrupts */
| 313 | |
| 314 | /* disable MSI-X interrupts */ |
| 315 | static int |
| 316 | vfio_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 */ |
no test coverage detected