MCPcopy Index your code
hub / github.com/F-Stack/f-stack / ff_extcl_to_rte

Function ff_extcl_to_rte

lib/ff_memory.c:379–395  ·  view source on GitHub ↗

create rte_buf refer to data which is transmit from bsd stack by EXT_CLUSTER.

Source from the content-addressed store, hash-verified

377
378// create rte_buf refer to data which is transmit from bsd stack by EXT_CLUSTER.
379static inline struct rte_mbuf* ff_extcl_to_rte(void *m )
380{
381 struct rte_mempool *mbuf_pool = pktmbuf_pool[lcore_conf.socket_id];
382 struct rte_mbuf *src_mbuf = NULL;
383 struct rte_mbuf *p_head = NULL;
384
385 src_mbuf = (struct rte_mbuf*)ff_rte_frm_extcl(m);
386 if ( NULL==src_mbuf ){
387 return NULL;
388 }
389 p_head = rte_pktmbuf_clone(src_mbuf, mbuf_pool);
390 if (p_head == NULL){
391 return NULL;
392 }
393
394 return p_head;
395}
396
397// create rte_mbuf refer to data in bsd mbuf.
398static inline struct rte_mbuf* ff_bsd_to_rte(void *m, int total)

Callers 1

ff_if_send_onepktFunction · 0.85

Calls 2

ff_rte_frm_extclFunction · 0.85
rte_pktmbuf_cloneFunction · 0.85

Tested by

no test coverage detected