DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Somnath Kotur <somnath.kotur@broadcom.com>,
	Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: [PATCH 04/11] net/bnxt: set burst handler correctly
Date: Wed,  5 Feb 2025 09:19:57 -0800	[thread overview]
Message-ID: <20250205172004.50395-5-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20250205172004.50395-1-ajit.khaparde@broadcom.com>

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(-)

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)


  parent reply	other threads:[~2025-02-05 17:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 17:19 [PATCH 00/11] bnxt patch set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 01/11] net/bnxt: disable TruFlow if compressed CQE is set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 02/11] net/bnxt: simplify check for CQE mode Ajit Khaparde
2025-02-05 17:19 ` [PATCH 03/11] net/bnxt: fix Rx handler Ajit Khaparde
2025-02-05 17:19 ` Ajit Khaparde [this message]
2025-02-05 17:19 ` [PATCH 05/11] net/bnxt/truFlow: Fix seg fault when rep are re-attached Ajit Khaparde
2025-02-05 17:19 ` [PATCH 06/11] net/bnxt: address coverity deadcode issue Ajit Khaparde
2025-02-05 17:20 ` [PATCH 07/11] net/bnxt: address coverity checked return issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 08/11] net/bnxt: address coverity overflow issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 09/11] net/bnxt: address coverity integer " Ajit Khaparde
2025-02-05 17:20 ` [PATCH 10/11] net/bnxt: address coverity uninitialized variables issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 11/11] net/bnxt: address coverity control flow issues Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205172004.50395-5-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=damodharam.ammepalli@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).