create rte_buf refer to data which is transmit from bsd stack by EXT_CLUSTER.
| 377 | |
| 378 | // create rte_buf refer to data which is transmit from bsd stack by EXT_CLUSTER. |
| 379 | static 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. |
| 398 | static inline struct rte_mbuf* ff_bsd_to_rte(void *m, int total) |
no test coverage detected