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

Function dummy_mbuf_prep

dpdk/app/test/test_pcapng.c:44–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44static void
45dummy_mbuf_prep(struct rte_mbuf *mb, uint8_t buf[], uint32_t buf_len,
46 uint32_t data_len)
47{
48 uint32_t i;
49 uint8_t *db;
50
51 mb->buf_addr = buf;
52 rte_mbuf_iova_set(mb, (uintptr_t)buf);
53 mb->buf_len = buf_len;
54 rte_mbuf_refcnt_set(mb, 1);
55
56 /* set pool pointer to dummy value, test doesn't use it */
57 mb->pool = (void *)buf;
58
59 rte_pktmbuf_reset(mb);
60 db = (uint8_t *)rte_pktmbuf_append(mb, data_len);
61
62 for (i = 0; i != data_len; i++)
63 db[i] = i;
64}
65
66/* Make an IP packet consisting of chain of one packets */
67static void

Callers 1

mbuf1_prepareFunction · 0.70

Calls 4

rte_mbuf_iova_setFunction · 0.85
rte_mbuf_refcnt_setFunction · 0.85
rte_pktmbuf_resetFunction · 0.85
rte_pktmbuf_appendFunction · 0.85

Tested by

no test coverage detected