[v3,35/51] net/bnxt: disable Tx vector mode if truflow is enabled

Message ID 20200702041134.43198-36-ajit.khaparde@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Series add features for host-based flow management |


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde July 2, 2020, 4:11 a.m. UTC
  From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

The vector mode in the tx handler is disabled when truflow is
enabled since truflow now requires bd action record support.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 drivers/net/bnxt/bnxt_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 697cd6651..355025741 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1116,12 +1116,15 @@  bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 #ifdef RTE_ARCH_X86
 #ifndef RTE_LIBRTE_IEEE1588
+	struct bnxt *bp = eth_dev->data->dev_private;
 	 * Vector mode transmit can be enabled only if not using scatter rx
 	 * or tx offloads.
 	if (!eth_dev->data->scattered_rx &&
-	    !eth_dev->data->dev_conf.txmode.offloads) {
+	    !eth_dev->data->dev_conf.txmode.offloads &&
+	    !BNXT_TRUFLOW_EN(bp)) {
 		PMD_DRV_LOG(INFO, "Using vector mode transmit for port %d\n",
 		return bnxt_xmit_pkts_vec;