net/bnxt: fix Rx queue state on start
[dpdk.git] / drivers / net / bnxt / bnxt_txr.c
index 9a6b96e..9e45ddd 100644 (file)
@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
                rte_free(txq->cp_ring->cp_ring_struct);
                rte_free(txq->cp_ring);
 
+               rte_memzone_free(txq->mz);
+               txq->mz = NULL;
+
                rte_free(txq);
                bp->tx_queues[i] = NULL;
        }
@@ -461,7 +464,7 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
                cons = RING_CMPL(ring_mask, raw_cons);
                txcmp = (struct tx_cmpl *)&cpr->cp_desc_ring[cons];
 
-               if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+               if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
                        break;
 
                opaque = rte_le_to_cpu_32(txcmp->opaque);