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

Function test_get_offset

dpdk/app/test/test_ipfrag.c:253–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253static inline void
254test_get_offset(struct rte_mbuf **mb, int32_t len,
255 uint16_t *offset, int ipv)
256{
257 int32_t i;
258
259 for (i = 0; i < len; i++) {
260 if (ipv == 4) {
261 struct rte_ipv4_hdr *iph =
262 rte_pktmbuf_mtod(mb[i], struct rte_ipv4_hdr *);
263 offset[i] = iph->fragment_offset;
264 } else if (ipv == 6) {
265 struct ipv6_extension_fragment *fh =
266 rte_pktmbuf_mtod_offset(
267 mb[i],
268 struct ipv6_extension_fragment *,
269 sizeof(struct rte_ipv6_hdr));
270 offset[i] = fh->frag_data;
271 }
272 }
273}
274
275static inline void
276test_get_frag_opt(struct rte_mbuf **mb, int32_t num,

Callers 1

test_ip_fragFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected