5 #ifndef _RTE_NET_PTYPE_H_ 6 #define _RTE_NET_PTYPE_H_ 24 uint16_t inner_l3_len;
51 rte_net_skip_ip6_ext(uint16_t proto,
const struct rte_mbuf *m, uint32_t *off,
85 uint32_t rte_net_get_ptype(
const struct rte_mbuf *m,
109 rte_net_intel_cksum_flags_prepare(
struct rte_mbuf *m, uint64_t ol_flags)
116 struct rte_ipv4_hdr *ipv4_hdr = NULL;
117 struct rte_ipv6_hdr *ipv6_hdr;
120 uint64_t inner_l3_offset = m->
l2_len;
127 if (!(ol_flags & (inner_requests | outer_requests)))
139 ipv4_hdr->hdr_checksum = 0;
145 udp_hdr = (
struct rte_udp_hdr *)((
char *)ipv4_hdr +
150 else if (ipv4_hdr->next_proto_id == IPPROTO_UDP)
160 else if (ipv6_hdr->proto == IPPROTO_UDP)
180 ipv4_hdr->hdr_checksum = 0;
185 if (ol_flags & RTE_MBUF_F_TX_IPV4) {
186 udp_hdr = (
struct rte_udp_hdr *)((
char *)ipv4_hdr +
192 struct rte_ipv6_hdr *, inner_l3_offset);
196 inner_l3_offset + m->
l3_len);
202 if (ol_flags & RTE_MBUF_F_TX_IPV4) {
204 tcp_hdr = (
struct rte_tcp_hdr *)((
char *)ipv4_hdr +
210 struct rte_ipv6_hdr *, inner_l3_offset);
214 inner_l3_offset + m->
l3_len);
242 rte_net_intel_cksum_prepare(
struct rte_mbuf *m)
244 return rte_net_intel_cksum_flags_prepare(m, m->
ol_flags);
#define RTE_MBUF_F_TX_TCP_CKSUM
#define RTE_MBUF_F_TX_OUTER_IPV6
#define RTE_MBUF_F_TX_UDP_SEG
#define rte_pktmbuf_mtod_offset(m, t, o)
#define RTE_MBUF_F_TX_OUTER_UDP_CKSUM
#define RTE_MBUF_F_TX_OUTER_IP_CKSUM
#define RTE_MBUF_F_TX_UDP_CKSUM
#define rte_pktmbuf_data_len(m)
#define RTE_MBUF_F_TX_L4_MASK
#define RTE_MBUF_F_TX_IP_CKSUM
#define RTE_MBUF_F_TX_TCP_SEG
#define RTE_MBUF_F_TX_OUTER_IPV4
static uint16_t rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
#define RTE_MBUF_F_TX_IPV4
static uint16_t rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)