1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #include <ethdev_pci.h>
7 #include "otx2_common.h"
8 #include "otx_ep_common.h"
12 otx_ep_eth_dev_uninit(struct rte_eth_dev *eth_dev)
14 RTE_SET_USED(eth_dev);
20 otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
22 RTE_SET_USED(eth_dev);
28 otx_ep_eth_dev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
29 struct rte_pci_device *pci_dev)
31 return rte_eth_dev_pci_generic_probe(pci_dev,
32 sizeof(struct otx_ep_device),
37 otx_ep_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
39 return rte_eth_dev_pci_generic_remove(pci_dev,
40 otx_ep_eth_dev_uninit);
43 /* Set of PCI devices this driver supports */
44 static const struct rte_pci_id pci_id_otx_ep_map[] = {
45 { RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_OCTEONTX_EP_VF) },
46 { RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_OCTEONTX2_EP_NET_VF) },
47 { RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN98XX_EP_NET_VF) },
48 { .vendor_id = 0, /* sentinel */ }
51 static struct rte_pci_driver rte_otx_ep_pmd = {
52 .id_table = pci_id_otx_ep_map,
53 .drv_flags = RTE_PCI_DRV_NEED_MAPPING,
54 .probe = otx_ep_eth_dev_pci_probe,
55 .remove = otx_ep_eth_dev_pci_remove,
58 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
59 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
60 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");