1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
5 #include <rte_bus_pci.h>
6 #include <rte_common.h>
10 #include "otx2_common.h"
13 npa_remove(struct rte_pci_device *pci_dev)
15 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
18 RTE_SET_USED(pci_dev);
23 npa_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
25 RTE_SET_USED(pci_drv);
27 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
30 RTE_SET_USED(pci_dev);
34 static const struct rte_pci_id pci_npa_map[] = {
36 RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
37 PCI_DEVID_OCTEONTX2_RVU_NPA_PF)
40 RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
41 PCI_DEVID_OCTEONTX2_RVU_NPA_VF)
48 static struct rte_pci_driver pci_npa = {
49 .id_table = pci_npa_map,
50 .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_IOVA_AS_VA,
55 RTE_PMD_REGISTER_PCI(mempool_octeontx2, pci_npa);
56 RTE_PMD_REGISTER_PCI_TABLE(mempool_octeontx2, pci_npa_map);
57 RTE_PMD_REGISTER_KMOD_DEP(mempool_octeontx2, "vfio-pci");