[dpdk-dev] [PATCH v7 06/10] eal/linux: add interrupt vectors handling on VFIO

Stephen Hemminger stephen at networkplumber.org
Tue May 5 20:38:42 CEST 2015


On Tue,  5 May 2015 13:39:42 +0800
Cunming Liang <cunming.liang at intel.com> wrote:

> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> index aea1fb1..387f54c 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> @@ -308,6 +308,18 @@ pci_vfio_setup_interrupts(struct rte_pci_device *dev, int vfio_dev_fd)
>  		case VFIO_PCI_MSIX_IRQ_INDEX:
>  			internal_config.vfio_intr_mode = RTE_INTR_MODE_MSIX;
>  			dev->intr_handle.type = RTE_INTR_HANDLE_VFIO_MSIX;
> +			for (i = 0; i < RTE_MAX_RXTX_INTR_VEC_ID; i++) {
> +				fd = eventfd(0, 0);
> +				if (fd < 0) {
> +

You should pass EFD_NONBLOCK and EFD_CLOEXEC as flags to any eventfd's created
internally.


More information about the dev mailing list