src/dpdk/drivers/bus/pci/linux/pci_vfio.c
static int
pci_vfio_disable_notifier(struct rte_pci_device *dev)
{
	int ret;

	ret = rte_intr_disable(&dev->vfio_req_intr_handle);
	if (ret) {
		RTE_LOG(ERR, EAL, "fail to disable req notifier.\n");
		return -1;
	}

	ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
					   pci_vfio_req_handler,
					   (void *)&dev->device);
	if (ret < 0) {
		RTE_LOG(ERR, EAL,
			 "fail to unregister req notifier handler.\n");
		return -1;
	}

	close(dev->vfio_req_intr_handle.fd);

	dev->vfio_req_intr_handle.fd = -1;
	dev->vfio_req_intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
	dev->vfio_req_intr_handle.vfio_dev_fd = -1;

	return 0;
}
/* disable notifier (only disable req now) */
disable notifier (only disable req now)
disable notifier ( only disable req now )
static int
pci_vfio_disable_notifier(struct rte_pci_device *dev)
{
	int ret;
	ret = rte_intr_disable(&dev->vfio_req_intr_handle);
	if (ret) {
		RTE_LOG(ERR, EAL, "fail to disable req notifier.\n");
		return -1;
	}
	ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
					   pci_vfio_req_handler,
					   (void *)&dev->device);
	if (ret < 0) {
		RTE_LOG(ERR, EAL,
			 "fail to unregister req notifier handler.\n");
		return -1;
	}
	close(dev->vfio_req_intr_handle.fd);
	dev->vfio_req_intr_handle.fd = -1;
	dev->vfio_req_intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
	dev->vfio_req_intr_handle.vfio_dev_fd = -1;
	return 0;
}
static int pci_vfio_disable_notifier ( struct rte_pci_device * dev ) { int ret ; ret = rte_intr_disable ( & dev -> vfio_req_intr_handle ) ; if ( ret ) { RTE_LOG ( ERR , EAL , " \n " ) ; return -1 ; } ret = rte_intr_callback_unregister ( & dev -> vfio_req_intr_handle , pci_vfio_req_handler , ( void * ) & dev -> device ) ; if ( ret < 0 ) { RTE_LOG ( ERR , EAL , " \n " ) ; return -1 ; } close ( dev -> vfio_req_intr_handle . fd ) ; dev -> vfio_req_intr_handle . fd = -1 ; dev -> vfio_req_intr_handle . type = RTE_INTR_HANDLE_UNKNOWN ; dev -> vfio_req_intr_handle . vfio_dev_fd = -1 ; return 0 ; }
disable notifier (only disable req now)
disable notifier ( only disable req now )