]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/bnxt/bnxt_hwrm.c
net/bnxt: check invalid L2 filter id
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index a82cc819f79bc8111e6e45b372ef1ea4ee10cc65..e230b468ee1b76b188762d64daa8b3913a99b49b 100644 (file)
@@ -327,6 +327,9 @@ int bnxt_hwrm_clear_filter(struct bnxt *bp,
        struct hwrm_cfa_l2_filter_free_input req = {.req_type = 0 };
        struct hwrm_cfa_l2_filter_free_output *resp = bp->hwrm_cmd_resp_addr;
 
+       if (filter->fw_l2_filter_id == UINT64_MAX)
+               return 0;
+
        HWRM_PREP(req, CFA_L2_FILTER_FREE, -1, resp);
 
        req.l2_filter_id = rte_cpu_to_le_64(filter->fw_l2_filter_id);