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

Function rte_intr_enable

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

Source from the content-addressed store, hash-verified

694}
695
696int
697rte_intr_enable(const struct rte_intr_handle *intr_handle)
698{
699 int rc = 0, uio_cfg_fd;
700
701 if (intr_handle == NULL)
702 return -1;
703
704 if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VDEV) {
705 rc = 0;
706 goto out;
707 }
708
709 uio_cfg_fd = rte_intr_dev_fd_get(intr_handle);
710 if (rte_intr_fd_get(intr_handle) < 0 || uio_cfg_fd < 0) {
711 rc = -1;
712 goto out;
713 }
714
715 switch (rte_intr_type_get(intr_handle)) {
716 /* write to the uio fd to enable the interrupt */
717 case RTE_INTR_HANDLE_UIO:
718 if (uio_intr_enable(intr_handle))
719 rc = -1;
720 break;
721 case RTE_INTR_HANDLE_UIO_INTX:
722 if (uio_intx_intr_enable(intr_handle))
723 rc = -1;
724 break;
725 /* not used at this moment */
726 case RTE_INTR_HANDLE_ALARM:
727 rc = -1;
728 break;
729#ifdef VFIO_PRESENT
730 case RTE_INTR_HANDLE_VFIO_MSIX:
731 if (vfio_enable_msix(intr_handle))
732 rc = -1;
733 break;
734 case RTE_INTR_HANDLE_VFIO_MSI:
735 if (vfio_enable_msi(intr_handle))
736 rc = -1;
737 break;
738 case RTE_INTR_HANDLE_VFIO_LEGACY:
739 if (vfio_enable_intx(intr_handle))
740 rc = -1;
741 break;
742#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
743 case RTE_INTR_HANDLE_VFIO_REQ:
744 if (vfio_enable_req(intr_handle))
745 rc = -1;
746 break;
747#endif
748#endif
749 /* not used at this moment */
750 case RTE_INTR_HANDLE_DEV_EVENT:
751 rc = -1;
752 break;
753 /* unknown handle type */

Callers 15

ntb_init_hwFunction · 0.50
eth_atl_dev_initFunction · 0.50
atl_dev_startFunction · 0.50
eth_igb_dev_initFunction · 0.50
eth_igb_startFunction · 0.50
igbvf_dev_startFunction · 0.50
eth_em_startFunction · 0.50
ena_stopFunction · 0.50
eth_ena_dev_initFunction · 0.50
ena_setup_rx_intrFunction · 0.50
virtio_intr_enableFunction · 0.50

Calls 9

rte_intr_type_getFunction · 0.85
rte_intr_dev_fd_getFunction · 0.85
rte_intr_fd_getFunction · 0.85
uio_intr_enableFunction · 0.85
uio_intx_intr_enableFunction · 0.85
vfio_enable_msixFunction · 0.85
vfio_enable_msiFunction · 0.85
vfio_enable_intxFunction · 0.85
vfio_enable_reqFunction · 0.85

Tested by 1

test_interrupt_enableFunction · 0.40