From d43fe8ea0c40c5534d83950bff08aa89457a3fd7 Mon Sep 17 00:00:00 2001 From: Santoshkumar Karanappa Rastapur Date: Wed, 2 Oct 2019 10:17:30 -0700 Subject: [PATCH] net/bnxt: fix flow steering 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") Cc: stable@dpdk.org Signed-off-by: Santoshkumar Karanappa Rastapur Reviewed-by: Lance Richardson Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- 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