The mbuf library now has routine to free multiple buffers.
Loop is no longer needed.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent,
void *userdata __rte_unused)
{
- unsigned i;
-
- for (i = 0; i < unsent; i++)
- rte_pktmbuf_free(pkts[i]);
+ rte_pktmbuf_free_bulk(pkts, unsent);
}
void
void *userdata)
{
uint64_t *count = userdata;
- unsigned i;
-
- for (i = 0; i < unsent; i++)
- rte_pktmbuf_free(pkts[i]);
+ rte_pktmbuf_free_bulk(pkts, unsent);
*count += unsent;
}