[04/11] net/bnxt: set burst handler correctly
Checks
Commit Message
We are incorrectly setting the Rx and Tx burst handlers to static mode
by default. Fix that by using the bnxt_receive_function and
bnxt_transmit_function calls to determine if the vector mode is enabled
and identify the appropriate burst handler during the initialization.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -6532,8 +6532,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
- eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
- eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
+ eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
+ eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
/*
* For secondary processes, we don't initialise any further