net/bnxt: disable vector mode if flow mark is used
Checks
Commit Message
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(-)
@@ -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) {