[dpdk-dev] [PATCH 15/15] vfio: change VFIO init to be extendable
Burakov, Anatoly
anatoly.burakov at intel.com
Tue May 10 13:50:23 CEST 2016
Hi Jan,
> We can now just OR the vfio_enabled sequentially and so adding new VFIO
> subsystems (vfio_platform) is possible.
>
> Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
> ---
> lib/librte_eal/linuxapp/eal/eal.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> index 92225cf..1549fe5 100644
> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -727,12 +727,14 @@ rte_eal_iopl_init(void) #ifdef VFIO_PRESENT static
> int rte_eal_vfio_setup(void) {
> - if (internal_config.no_pci)
> - return 0;
> + int vfio_enabled = 0;
>
> - pci_vfio_enable();
> + if (!internal_config.no_pci) {
> + pci_vfio_enable();
> + vfio_enabled |= pci_vfio_is_enabled();
> + }
Could there be a situation where we need to know if a particular VFIO subsystem is enabled? Do you think it's worth adding (e.g. vfio_enabled |= VFIO_PCI_ENABLED or something)? (I don't imply it is necessary, just asking)
Thanks,
Anatoly
More information about the dev
mailing list