src/dpdk/lib/librte_mbuf/rte_mbuf.c
void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
{
	struct rte_mbuf *m, *m_next, *pending[RTE_PKTMBUF_FREE_PENDING_SZ];
	unsigned int idx, nb_pending = 0;

	for (idx = 0; idx < count; idx++) {
		m = mbufs[idx];
		if (unlikely(m == NULL))
			continue;

		__rte_mbuf_sanity_check(m, 1);

		do {
			m_next = m->next;
			__rte_pktmbuf_free_seg_via_array(m,
					pending, &nb_pending,
					RTE_PKTMBUF_FREE_PENDING_SZ);
			m = m_next;
		} while (m != NULL);
	}

	if (nb_pending > 0)
		rte_mempool_put_bulk(pending[0]->pool, (void **)pending, nb_pending);
}
/* Free a bulk of packet mbufs back into their original mempools. */
Free a bulk of packet mbufs back into their original mempools.
Free a bulk of packet mbufs back into their original mempools .
void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
{
	struct rte_mbuf *m, *m_next, *pending[RTE_PKTMBUF_FREE_PENDING_SZ];
	unsigned int idx, nb_pending = 0;
	for (idx = 0; idx < count; idx++) {
		m = mbufs[idx];
		if (unlikely(m == NULL))
			continue;
		__rte_mbuf_sanity_check(m, 1);
		do {
			m_next = m->next;
			__rte_pktmbuf_free_seg_via_array(m,
					pending, &nb_pending,
					RTE_PKTMBUF_FREE_PENDING_SZ);
			m = m_next;
		} while (m != NULL);
	}
	if (nb_pending > 0)
		rte_mempool_put_bulk(pending[0]->pool, (void **)pending, nb_pending);
}
void rte_pktmbuf_free_bulk ( struct rte_mbuf * * mbufs , unsigned int count ) { struct rte_mbuf * m , * m_next , * pending [ RTE_PKTMBUF_FREE_PENDING_SZ ] ; unsigned int idx , nb_pending = 0 ; for ( idx = 0 ; idx < count ; idx ++ ) { m = mbufs [ idx ] ; if ( unlikely ( m == NULL ) ) continue ; __rte_mbuf_sanity_check ( m , 1 ) ; do { m_next = m -> next ; __rte_pktmbuf_free_seg_via_array ( m , pending , & nb_pending , RTE_PKTMBUF_FREE_PENDING_SZ ) ; m = m_next ; } while ( m != NULL ) ; } if ( nb_pending > 0 ) rte_mempool_put_bulk ( pending [ 0 ] -> pool , ( void * * ) pending , nb_pending ) ; }
Free a bulk of packet mbufs back into their original mempools.
Free a bulk of packet mbufs back into their original mempools .