| 93 | } |
| 94 | |
| 95 | static __rte_always_inline void |
| 96 | adjust_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 | |
| 108 | static __rte_always_inline void |
| 109 | adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph, |
no test coverage detected