1 /* 2 * SPDX-License-Identifier: BSD-3-Clause 3 * Copyright(c) 2023 Napatech A/S 4 */ 5 6 #ifndef _NTNIC_VFIO_H_ 7 #define _NTNIC_VFIO_H_ 8 9 #include <rte_dev.h> 10 #include <rte_bus_pci.h> 11 #include <ethdev_pci.h> 12 13 void 14 nt_vfio_init(void); 15 16 int 17 nt_vfio_setup(struct rte_pci_device *dev); 18 int 19 nt_vfio_remove(int vf_num); 20 21 int 22 nt_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size); 23 int 24 nt_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size); 25 26 /* Find device (PF/VF) number from device address */ 27 int 28 nt_vfio_vf_num(const struct rte_pci_device *dev); 29 #endif /* _NTNIC_VFIO_H_ */ 30