[01/15] net/bnxt: fix incorrect flow steering

Message ID 20190901221213.92149-2-ajit.khaparde@broadcom.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series bnxt patchset |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Ajit Khaparde Sept. 1, 2019, 10:12 p.m. UTC
  From: Santoshkumar Karanappa Rastapur <santosh.rastapur@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@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index deb9733e9..be9b6fad3 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