net/ice/base: init flag redirect table for parser
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index 02613bd..585cded 100644 (file)
@@ -1873,6 +1873,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
        struct hwrm_ring_grp_alloc_input req = {.req_type = 0 };
        struct hwrm_ring_grp_alloc_output *resp = bp->hwrm_cmd_resp_addr;
 
+       /* Don't attempt to re-create the ring group if it is already created */
+       if (bp->grp_info[idx].fw_grp_id != INVALID_HW_RING_ID)
+               return 0;
+
        HWRM_PREP(&req, HWRM_RING_GRP_ALLOC, BNXT_USE_CHIMP_MB);
 
        req.cr = rte_cpu_to_le_16(bp->grp_info[idx].cp_fw_ring_id);
@@ -1897,6 +1901,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
        struct hwrm_ring_grp_free_input req = {.req_type = 0 };
        struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
 
+       if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID)
+               return 0;
+
        HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB);
 
        req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);