summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2017-07-20 22:22:33 -0500
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:55:37 +0800
commit2a7b606ebc7d5455b98d6a674c1acc26020c86db (patch)
treeec70b3640a82adf6e036930ff726bf8026cca4b1
parent802dc1443e056b69708c46f82a6b9ba5a7d4a22e (diff)
downloaddpdk-stable-2a7b606ebc7d5455b98d6a674c1acc26020c86db.zip
dpdk-stable-2a7b606ebc7d5455b98d6a674c1acc26020c86db.tar.gz
dpdk-stable-2a7b606ebc7d5455b98d6a674c1acc26020c86db.tar.xz
net/bnxt: free filter before reusing it
[ upstream commit 4cddfcb71b1edeed845aff0b19c9ea73622f79c6 ] This patch sends the HWRM command to free a filter in the hardware, before using it again. Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free") Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6a5159c..f64cb80 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -221,6 +221,9 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
struct hwrm_cfa_l2_filter_alloc_output *resp = bp->hwrm_cmd_resp_addr;
uint32_t enables = 0;
+ if (filter->fw_l2_filter_id != UINT64_MAX)
+ bnxt_hwrm_clear_filter(bp, filter);
+
HWRM_PREP(req, CFA_L2_FILTER_ALLOC, -1, resp);
req.flags = rte_cpu_to_le_32(filter->flags);