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

Function adjust_ipv4_pktlen

dpdk/examples/ipsec-secgw/ipsec_worker.h:95–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95static __rte_always_inline void
96adjust_ipv4_pktlen(struct rte_mbuf *m, const struct rte_ipv4_hdr *iph,
97 uint32_t l2_len)
98{
99 uint32_t plen, trim;
100
101 plen = rte_be_to_cpu_16(iph->total_length) + l2_len;
102 if (plen < m->pkt_len) {
103 trim = m->pkt_len - plen;
104 rte_pktmbuf_trim(m, trim);
105 }
106}
107
108static __rte_always_inline void
109adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,

Callers 1

prepare_one_packetFunction · 0.85

Calls 1

rte_pktmbuf_trimFunction · 0.85

Tested by

no test coverage detected