DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org, somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH] net/bnxt: disable vector mode if flow mark is used
Date: Fri, 24 Apr 2020 10:32:22 -0700	[thread overview]
Message-ID: <20200424173222.32335-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20200305064500.5634-1-stephen@networkplumber.org>

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

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) {
-- 
2.20.1


      parent reply	other threads:[~2020-04-24 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05  6:45 [dpdk-dev] [PATCH] net/bnxt: allow configuring vector mode Stephen Hemminger
2020-03-05 20:10 ` Lance Richardson
2020-03-05 22:18   ` Stephen Hemminger
2020-03-31 11:36     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-03-31 14:31       ` Ajit Khaparde
2020-03-31 15:43         ` Thomas Monjalon
2020-03-31 15:58           ` Stephen Hemminger
2020-03-31 17:13             ` Thomas Monjalon
2020-03-24  4:02 ` [dpdk-dev] " Ajit Khaparde
2020-04-24 17:32 ` Stephen Hemminger [this message]

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=20200424173222.32335-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=somnath.kotur@broadcom.com \
    /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).