MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_mbuf_raw_alloc

Function rte_mbuf_raw_alloc

dpdk/lib/mbuf/rte_mbuf.h:596–604  ·  view source on GitHub ↗

* 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:

Source from the content-addressed store, hash-verified

594 * - NULL if allocation failed.
595 */
596static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
597{
598 struct rte_mbuf *m;
599
600 if (rte_mempool_get(mp, (void **)&m) < 0)
601 return NULL;
602 __rte_mbuf_raw_sanity_check(m);
603 return m;
604}
605
606/**
607 * Put mbuf back into its original mempool.

Callers 15

rte_pktmbuf_allocFunction · 0.85
ntb_queue_initFunction · 0.85
ntb_dequeue_bufsFunction · 0.85
atl_alloc_rx_queue_mbufsFunction · 0.85
atl_recv_pktsFunction · 0.85
eth_em_recv_pktsFunction · 0.85
em_alloc_rx_queue_mbufsFunction · 0.85
eth_igb_recv_pktsFunction · 0.85
igb_alloc_rx_queue_mbufsFunction · 0.85
mlx4_rx_burstFunction · 0.85

Calls 2

rte_mempool_getFunction · 0.85

Tested by 1