net/bnxt: disable vector mode if flow mark is used

Message ID 20200424173222.32335-1-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: disable vector mode if flow mark is used |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-testing fail Testing issues
ci/Intel-compilation success Compilation OK

Commit Message

Stephen Hemminger April 24, 2020, 5:32 p.m. UTC
  Since vector mode can't be used with flow mark actions.
The choice of vector or non-vector mode is done dynamically
earlier in the initialization process (config) and the user
application has no direct control over the selection.

Therefore the best resolution to the conflict is for
the driver to disable vector mode if it needs to.

Fixes: 94eb699bc82e ("net/bnxt: support flow mark action")
Cc: ajit.khaparde@broadcom.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnxt/bnxt_flow.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 44734272fbea..7715a7b45173 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -18,6 +18,7 @@ 
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_rxq.h"
+#include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
 
@@ -1405,14 +1406,10 @@  bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 	case RTE_FLOW_ACTION_TYPE_MARK:
 		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
 			PMD_DRV_LOG(DEBUG,
-				    "Disable vector processing for mark\n");
-			rte_flow_error_set(error,
-					   ENOTSUP,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Disable vector processing for mark");
-			rc = -rte_errno;
-			goto ret;
+				    "Disabling vector processing for mark\n");
+
+			bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
+			dev->rx_pkt_burst = &bnxt_recv_pkts;
 		}
 
 		if (bp->mark_table == NULL) {