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

Function rte_intr_disable

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

Source from the content-addressed store, hash-verified

826}
827
828int
829rte_intr_disable(const struct rte_intr_handle *intr_handle)
830{
831 int rc = 0, uio_cfg_fd;
832
833 if (intr_handle == NULL)
834 return -1;
835
836 if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VDEV) {
837 rc = 0;
838 goto out;
839 }
840
841 uio_cfg_fd = rte_intr_dev_fd_get(intr_handle);
842 if (rte_intr_fd_get(intr_handle) < 0 || uio_cfg_fd < 0) {
843 rc = -1;
844 goto out;
845 }
846
847 switch (rte_intr_type_get(intr_handle)) {
848 /* write to the uio fd to disable the interrupt */
849 case RTE_INTR_HANDLE_UIO:
850 if (uio_intr_disable(intr_handle))
851 rc = -1;
852 break;
853 case RTE_INTR_HANDLE_UIO_INTX:
854 if (uio_intx_intr_disable(intr_handle))
855 rc = -1;
856 break;
857 /* not used at this moment */
858 case RTE_INTR_HANDLE_ALARM:
859 rc = -1;
860 break;
861#ifdef VFIO_PRESENT
862 case RTE_INTR_HANDLE_VFIO_MSIX:
863 if (vfio_disable_msix(intr_handle))
864 rc = -1;
865 break;
866 case RTE_INTR_HANDLE_VFIO_MSI:
867 if (vfio_disable_msi(intr_handle))
868 rc = -1;
869 break;
870 case RTE_INTR_HANDLE_VFIO_LEGACY:
871 if (vfio_disable_intx(intr_handle))
872 rc = -1;
873 break;
874#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
875 case RTE_INTR_HANDLE_VFIO_REQ:
876 if (vfio_disable_req(intr_handle))
877 rc = -1;
878 break;
879#endif
880#endif
881 /* not used at this moment */
882 case RTE_INTR_HANDLE_DEV_EVENT:
883 rc = -1;
884 break;
885 /* unknown handle type */

Callers 15

ntb_dev_closeFunction · 0.50
atl_dev_startFunction · 0.50
atl_dev_closeFunction · 0.50
eth_igb_startFunction · 0.50
eth_igb_stopFunction · 0.50
igbvf_dev_stopFunction · 0.50
eth_em_closeFunction · 0.50
ena_closeFunction · 0.50
ena_stopFunction · 0.50
ena_setup_rx_intrFunction · 0.50
virtio_intr_disableFunction · 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_disableFunction · 0.85
uio_intx_intr_disableFunction · 0.85
vfio_disable_msixFunction · 0.85
vfio_disable_msiFunction · 0.85
vfio_disable_intxFunction · 0.85
vfio_disable_reqFunction · 0.85

Tested by 1

test_interrupt_disableFunction · 0.40