From 608e6fd6ab4f03b3f629779db47e8effe19ff4bc Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Mon, 16 Apr 2018 18:11:19 -0700 Subject: [PATCH] net/bnxt: fix flow destroy bnxt_hwrm_clear_l2_filter needs to be called only if the filter type is L2 and not otherwise. Also check for the return value of bnxt_hwrm_clear_l2_filter(). Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index d28c04038f..1793495398 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -1144,8 +1144,8 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, ret = bnxt_hwrm_clear_em_filter(bp, filter); if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) ret = bnxt_hwrm_clear_ntuple_filter(bp, filter); - - bnxt_hwrm_clear_l2_filter(bp, filter); + else + ret = bnxt_hwrm_clear_l2_filter(bp, filter); if (!ret) { STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next); rte_free(flow); -- 2.20.1