+
+ /* If this was the last flow associated with this vnic,
+ * switch the queue back to RSS pool.
+ */
+ if (vnic && STAILQ_EMPTY(&vnic->flow_list)) {
+ rte_free(vnic->fw_grp_ids);
+ if (vnic->rx_queue_cnt > 1) {
+ if (BNXT_CHIP_THOR(bp)) {
+ int j;
+
+ for (j = 0; j < vnic->num_lb_ctxts;
+ j++) {
+ bnxt_hwrm_vnic_ctx_free(bp,
+ vnic,
+ vnic->fw_grp_ids[j]);
+ vnic->fw_grp_ids[j] =
+ INVALID_HW_RING_ID;
+ }
+ vnic->num_lb_ctxts = 0;
+ } else {
+ bnxt_hwrm_vnic_ctx_free(bp,
+ vnic,
+ vnic->rss_rule);
+ vnic->rss_rule = INVALID_HW_RING_ID;
+ }
+ }
+ bnxt_hwrm_vnic_free(bp, vnic);
+ vnic->rx_queue_cnt = 0;
+ bp->nr_vnics--;
+ }