[dpdk-dev] [PATCH 11/15] vfio: move global vfio_cfg to eal_vfio.c
Jan Viktorin
viktorin at rehivetech.com
Fri May 13 17:34:33 CEST 2016
Self review:
* missing #ifdef VFIO_PRESENT ... #endif in eal_vfio.c leads to fail
when VFIO build is disabled
Jan
On Fri, 29 Apr 2016 15:44:12 +0200
Jan Viktorin <viktorin at rehivetech.com> wrote:
> The vfio_cfg is a module-global variable and so together with this
> variable, it is necessary to move functions:
>
> * pci_vfio_get_group_fd
> - renamed to vfio_get_group_fd
> - pci_* version removed (no other call in EAL)
>
> * pci_vfio_setup_device
> - renamed as vfio_setup_device
>
> * pci_vfio_enable
> - renamed as vfio_enable
> - generalized to check for a specific vfio driver presence
> - pci_* specialization preserved as a wrapper
>
> * pci_vfio_is_enabled
> - renamed as vfio_is_enabled
> - generalized to check for a specific vfio driver presence
> to preserve the semantics of VFIO + PCI
> - pci_* specialization preserved as a wrapper
>
> * clear_current_group
> - private function, just moved
>
> To stop GCC complaining about "defined but not used", the private
> function pci_vfio_get_group_no has been removed entirely.
>
> Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
> ---
> lib/librte_eal/linuxapp/eal/eal_pci_init.h | 1 -
> lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 282 +--------------------
> lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 2 +-
> lib/librte_eal/linuxapp/eal/eal_vfio.c | 272 ++++++++++++++++++++
> lib/librte_eal/linuxapp/eal/eal_vfio.h | 17 ++
> 5 files changed, 294 insertions(+), 280 deletions(-)
[...]
More information about the dev
mailing list