[dpdk-dev] [PATCH v3 01/16] net/bnxt: fix incorrect flow steering

Ajit Khaparde ajit.khaparde at broadcom.com
Wed Oct 2 19:17:30 CEST 2019


From: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>

When user creates a flow similar to an existing flow with just the
destination queue change, we delete the old filter and allocate a new one
with this destination queue change. We were also allocating a new L2
filter matching the same destination mac resulting in 2 L2 filters for the
same destination mac. This was causing any flow matching the destination
mac to be steered to this queue instead of the default queue.
Fixed it by deleting this stale L2 filter.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index deb9733e99..be9b6fad39 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1028,6 +1028,10 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
 				    sizeof(nf->dst_ipaddr_mask))) {
 				if (mf->dst_id == nf->dst_id)
 					return -EEXIST;
+				/* Clear the new L2 filter that was created
+				 * earlier in bnxt_validate_and_parse_flow.
+				 */
+				bnxt_hwrm_clear_l2_filter(bp, nf);
 				/*
 				 * Same Flow, Different queue
 				 * Clear the old ntuple filter
-- 
2.20.1 (Apple Git-117)



More information about the dev mailing list