net/bnxt: fix Tx and Rx burst for secondary process

We were initializing Tx and Rx burst functions only for primary
processes. Fixing it in this patch.

Fixes: 88920136688c ("net/bnxt: support xstats get by id")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
Ajit Khaparde 2018-05-22 11:13:42 -07:00 committed by Ferruh Yigit
parent 704d430ccc
commit 08aa0ebaca

View File

@ -3151,10 +3151,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
}
skip_init:
eth_dev->dev_ops = &bnxt_dev_ops;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,