disable req notifier */
| 373 | |
| 374 | /* disable req notifier */ |
| 375 | static int |
| 376 | vfio_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 |
no test coverage detected