src/dpdk/lib/librte_mbuf/rte_mbuf.h
static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
{
	struct rte_mbuf *m;

	if (rte_mempool_get(mp, (void **)&m) < 0)
		return NULL;
	__rte_mbuf_raw_sanity_check(m);
	return m;
}
/**
 * Allocate an uninitialized mbuf from mempool *mp*.
 *
 * This function can be used by PMDs (especially in RX functions) to
 * allocate an uninitialized mbuf. The driver is responsible of
 * initializing all the required fields. See rte_pktmbuf_reset().
 * For standard needs, prefer rte_pktmbuf_alloc().
 *
 * The caller can expect that the following fields of the mbuf structure
 * are initialized: buf_addr, buf_iova, buf_len, refcnt=1, nb_segs=1,
 * next=NULL, pool, priv_size. The other fields must be initialized
 * by the caller.
 *
 * @param mp
 *   The mempool from which mbuf is allocated.
 * @return
 *   - The pointer to the new mbuf on success.
 *   - NULL if allocation failed.
 */
Allocate an uninitialized mbuf from mempool *mp*.
This function can be used by PMDs (especially in RX functions) to
allocate an uninitialized mbuf. The driver is responsible of
initializing all the required fields.

The caller can expect that the following fields of the mbuf structure
are initialized: buf_addr, buf_iova, buf_len, refcnt=1, nb_segs=1,
next=NULL, pool, priv_size. The other fields must be initialized
by the caller.

@param mp
The mempool from which mbuf is allocated.
@return
- The pointer to the new mbuf on success.
- NULL if allocation failed.
Allocate an uninitialized mbuf from mempool * mp * . This function can be used by PMDs ( especially in RX functions ) to allocate an uninitialized mbuf . The driver is responsible of initializing all the required fields . The caller can expect that the following fields of the mbuf structure are initialized : buf_addr buf_iova buf_len refcnt = 1 nb_segs = 1 next = NULL pool priv_size . The other fields must be initialized by the caller . @param mp The mempool from which mbuf is allocated . @return - The pointer to the new mbuf on success . - NULL if allocation failed .
static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
{
	struct rte_mbuf *m;
	if (rte_mempool_get(mp, (void **)&m) < 0)
		return NULL;
	__rte_mbuf_raw_sanity_check(m);
	return m;
}
static inline struct rte_mbuf * rte_mbuf_raw_alloc ( struct rte_mempool * mp ) { struct rte_mbuf * m ; if ( rte_mempool_get ( mp , ( void * * ) & m ) < 0 ) return NULL ; __rte_mbuf_raw_sanity_check ( m ) ; return m ; }
Allocate an uninitialized mbuf from mempool *mp*.
Allocate an uninitialized mbuf from mempool * mp * .