The bug fix was incorrect as it did not take account of the fact that
the mbufs that were previously freed may have since be re-allocated.
Reverts:
b35d0d80f0a8 ("ixgbe: check mbuf refcnt when clearing a ring")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
if (rxq->sw_ring != NULL) {
for (i = 0; i < rxq->nb_rx_desc; i++) {
- if (rxq->sw_ring[i].mbuf != NULL &&
- rte_mbuf_refcnt_read(rxq->sw_ring[i].mbuf)) {
+ if (rxq->sw_ring[i].mbuf != NULL) {
rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);
rxq->sw_ring[i].mbuf = NULL;
}
nb_free < max_desc && i != txq->tx_tail;
i = (i + 1) & max_desc) {
txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
- /*
- * Check for already freed packets.
- * Note: ixgbe_tx_free_bufs does not NULL after free,
- * so we actually have to check the reference count.
- */
- if (txe->mbuf != NULL &&
- rte_mbuf_refcnt_read(txe->mbuf) != 0)
+ if (txe->mbuf != NULL)
rte_pktmbuf_free_seg(txe->mbuf);
}
/* reset tx_entry */