From: Ajit Khaparde Date: Tue, 17 Apr 2018 01:11:19 +0000 (-0700) Subject: net/bnxt: fix flow destroy X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=608e6fd6ab4f03b3f629779db47e8effe19ff4bc;p=dpdk.git 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 --- 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);