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.khapa...@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.ko...@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepa...@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 81a7723c7e..b18247feb2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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
-- 
2.39.5 (Apple Git-154)

Reply via email to