net/nfp: fix multi-process PF probing
[dpdk.git] / drivers / net / octeontx_ep / otx_ep_ethdev.c
index 89056f5..a243683 100644 (file)
@@ -136,6 +136,12 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
 
        otx_epvf->fn_list.setup_device_regs(otx_epvf);
 
+       otx_epvf->eth_dev->rx_pkt_burst = &otx_ep_recv_pkts;
+       if (otx_epvf->chip_id == PCI_DEVID_OCTEONTX_EP_VF)
+               otx_epvf->eth_dev->tx_pkt_burst = &otx_ep_xmit_pkts;
+       else if (otx_epvf->chip_id == PCI_DEVID_OCTEONTX2_EP_NET_VF ||
+                otx_epvf->chip_id == PCI_DEVID_CN98XX_EP_NET_VF)
+               otx_epvf->eth_dev->tx_pkt_burst = &otx2_ep_xmit_pkts;
        ethdev_queues = (uint32_t)(otx_epvf->sriov_info.rings_per_vf);
        otx_epvf->max_rx_queues = ethdev_queues;
        otx_epvf->max_tx_queues = ethdev_queues;
@@ -382,6 +388,8 @@ otx_ep_eth_dev_uninit(struct rte_eth_dev *eth_dev)
        otx_epdev_exit(eth_dev);
 
        eth_dev->dev_ops = NULL;
+       eth_dev->rx_pkt_burst = NULL;
+       eth_dev->tx_pkt_burst = NULL;
 
        return 0;
 }
@@ -455,4 +463,4 @@ static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_net_ep_logtype, NOTICE);