for (i = 0; i < ring->ring_size; ++i) {
struct ena_tx_buffer *tx_buf = &ring->tx_buffer_info[i];
- if (tx_buf->mbuf)
+ if (tx_buf->mbuf) {
rte_pktmbuf_free(tx_buf->mbuf);
+ tx_buf->mbuf = NULL;
+ }
}
}
"bad ring state\n");
/* get resources for incoming packets */
- rc = rte_mempool_get_bulk(rxq->mb_pool, (void **)mbufs, count);
+ rc = rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, count);
if (unlikely(rc < 0)) {
rte_atomic64_inc(&rxq->adapter->drv_stats->rx_nombuf);
++rxq->rx_stats.mbuf_alloc_fail;
if (unlikely(i < count)) {
PMD_DRV_LOG(WARNING, "refilled rx qid %d with only %d "
"buffers (from %d)\n", rxq->id, i, count);
- rte_mempool_put_bulk(rxq->mb_pool, (void **)(&mbufs[i]),
- count - i);
+ rte_pktmbuf_free_bulk(&mbufs[i], count - i);
++rxq->rx_stats.refill_partial;
}