1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 1982, 1986, 1990, 1993
3 * The Regents of the University of California.
4 * Copyright(c) 2010-2014 Intel Corporation.
5 * Copyright(c) 2014 6WIND S.A.
20 #ifdef RTE_EXEC_ENV_WINDOWS
23 #include <sys/socket.h>
24 #include <sys/types.h>
25 #include <netinet/in.h>
26 #include <arpa/inet.h>
27 #include <netinet/ip.h>
28 #include <netinet/ip6.h>
31 #include <rte_byteorder.h>
44 uint8_t version_ihl; /**< version and header length */
46 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
47 uint8_t ihl:4; /**< header length */
48 uint8_t version:4; /**< version */
49 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
50 uint8_t version:4; /**< version */
51 uint8_t ihl:4; /**< header length */
55 uint8_t type_of_service; /**< type of service */
56 rte_be16_t total_length; /**< length of packet */
57 rte_be16_t packet_id; /**< packet ID */
58 rte_be16_t fragment_offset; /**< fragmentation offset */
59 uint8_t time_to_live; /**< time to live */
60 uint8_t next_proto_id; /**< protocol ID */
61 rte_be16_t hdr_checksum; /**< header checksum */
62 rte_be32_t src_addr; /**< source address */
63 rte_be32_t dst_addr; /**< destination address */
66 /** Create IPv4 address */
67 #define RTE_IPV4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
68 (((b) & 0xff) << 16) | \
69 (((c) & 0xff) << 8) | \
72 /** Maximal IPv4 packet length (including a header) */
73 #define RTE_IPV4_MAX_PKT_LEN 65535
75 /** Internet header length mask for version_ihl field */
76 #define RTE_IPV4_HDR_IHL_MASK (0x0f)
78 * Internet header length field multiplier (IHL field specifies overall header
79 * length in number of 4-byte words)
81 #define RTE_IPV4_IHL_MULTIPLIER (4)
83 /* Type of Service fields */
84 #define RTE_IPV4_HDR_DSCP_MASK (0xfc)
85 #define RTE_IPV4_HDR_ECN_MASK (0x03)
86 #define RTE_IPV4_HDR_ECN_CE RTE_IPV4_HDR_ECN_MASK
88 /* Fragment Offset * Flags. */
89 #define RTE_IPV4_HDR_DF_SHIFT 14
90 #define RTE_IPV4_HDR_MF_SHIFT 13
91 #define RTE_IPV4_HDR_FO_SHIFT 3
93 #define RTE_IPV4_HDR_DF_FLAG (1 << RTE_IPV4_HDR_DF_SHIFT)
94 #define RTE_IPV4_HDR_MF_FLAG (1 << RTE_IPV4_HDR_MF_SHIFT)
96 #define RTE_IPV4_HDR_OFFSET_MASK ((1 << RTE_IPV4_HDR_MF_SHIFT) - 1)
98 #define RTE_IPV4_HDR_OFFSET_UNITS 8
101 #define RTE_IPV4_HDR_OPT_EOL 0
102 #define RTE_IPV4_HDR_OPT_NOP 1
103 #define RTE_IPV4_HDR_OPT_COPIED(v) ((v) & 0x80)
104 #define RTE_IPV4_HDR_OPT_MAX_LEN 40
109 #define RTE_IPV4_ANY ((uint32_t)0x00000000) /**< 0.0.0.0 */
110 #define RTE_IPV4_LOOPBACK ((uint32_t)0x7f000001) /**< 127.0.0.1 */
111 #define RTE_IPV4_BROADCAST ((uint32_t)0xe0000000) /**< 224.0.0.0 */
112 #define RTE_IPV4_ALLHOSTS_GROUP ((uint32_t)0xe0000001) /**< 224.0.0.1 */
113 #define RTE_IPV4_ALLRTRS_GROUP ((uint32_t)0xe0000002) /**< 224.0.0.2 */
114 #define RTE_IPV4_MAX_LOCAL_GROUP ((uint32_t)0xe00000ff) /**< 224.0.0.255 */
117 * IPv4 Multicast-related macros
119 #define RTE_IPV4_MIN_MCAST \
120 RTE_IPV4(224, 0, 0, 0) /**< Minimal IPv4-multicast address */
121 #define RTE_IPV4_MAX_MCAST \
122 RTE_IPV4(239, 255, 255, 255) /**< Maximum IPv4 multicast address */
124 #define RTE_IS_IPV4_MCAST(x) \
125 ((x) >= RTE_IPV4_MIN_MCAST && (x) <= RTE_IPV4_MAX_MCAST)
126 /**< check if IPv4 address is multicast */
128 /* IPv4 default fields values */
129 #define RTE_IPV4_MIN_IHL (0x5)
130 #define RTE_IPV4_VHL_DEF ((IPVERSION << 4) | RTE_IPV4_MIN_IHL)
133 * Get the length of an IPv4 header.
136 * Pointer to the IPv4 header.
138 * The length of the IPv4 header (with options if present) in bytes.
140 static inline uint8_t
141 rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr)
143 return (uint8_t)((ipv4_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
144 RTE_IPV4_IHL_MULTIPLIER);
148 * @internal Calculate a sum of all words in the buffer.
149 * Helper routine for the rte_raw_cksum().
152 * Pointer to the buffer.
154 * Length of the buffer.
156 * Initial value of the sum.
158 * sum += Sum of all words in the buffer.
160 static inline uint32_t
161 __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)
163 /* extend strict-aliasing rules */
164 typedef uint16_t __attribute__((__may_alias__)) u16_p;
165 const u16_p *u16_buf = (const u16_p *)buf;
166 const u16_p *end = u16_buf + len / sizeof(*u16_buf);
168 for (; u16_buf != end; ++u16_buf)
171 /* if length is odd, keeping it byte order independent */
172 if (unlikely(len % 2)) {
174 *(unsigned char *)&left = *(const unsigned char *)end;
182 * @internal Reduce a sum to the non-complemented checksum.
183 * Helper routine for the rte_raw_cksum().
188 * The non-complemented checksum.
190 static inline uint16_t
191 __rte_raw_cksum_reduce(uint32_t sum)
193 sum = ((sum & 0xffff0000) >> 16) + (sum & 0xffff);
194 sum = ((sum & 0xffff0000) >> 16) + (sum & 0xffff);
195 return (uint16_t)sum;
199 * Process the non-complemented checksum of a buffer.
202 * Pointer to the buffer.
204 * Length of the buffer.
206 * The non-complemented checksum.
208 static inline uint16_t
209 rte_raw_cksum(const void *buf, size_t len)
213 sum = __rte_raw_cksum(buf, len, 0);
214 return __rte_raw_cksum_reduce(sum);
218 * Compute the raw (non complemented) checksum of a packet.
221 * The pointer to the mbuf.
223 * The offset in bytes to start the checksum.
225 * The length in bytes of the data to checksum.
227 * A pointer to the checksum, filled on success.
229 * 0 on success, -1 on error (bad length or offset).
232 rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,
235 const struct rte_mbuf *seg;
238 uint32_t seglen, done;
240 /* easy case: all data in the first segment */
241 if (off + len <= rte_pktmbuf_data_len(m)) {
242 *cksum = rte_raw_cksum(rte_pktmbuf_mtod_offset(m,
243 const char *, off), len);
247 if (unlikely(off + len > rte_pktmbuf_pkt_len(m)))
248 return -1; /* invalid params, return a dummy value */
250 /* else browse the segment to find offset */
252 for (seg = m; seg != NULL; seg = seg->next) {
253 seglen = rte_pktmbuf_data_len(seg);
258 RTE_ASSERT(seg != NULL);
262 buf = rte_pktmbuf_mtod_offset(seg, const char *, off);
264 /* all in one segment */
265 *cksum = rte_raw_cksum(buf, len);
269 /* hard case: process checksum of several segments */
273 tmp = __rte_raw_cksum(buf, seglen, 0);
275 tmp = rte_bswap16((uint16_t)tmp);
281 buf = rte_pktmbuf_mtod(seg, const char *);
282 seglen = rte_pktmbuf_data_len(seg);
283 if (seglen > len - done)
287 *cksum = __rte_raw_cksum_reduce(sum);
292 * Process the IPv4 checksum of an IPv4 header.
294 * The checksum field must be set to 0 by the caller.
297 * The pointer to the contiguous IPv4 header.
299 * The complemented checksum to set in the IP packet.
301 static inline uint16_t
302 rte_ipv4_cksum(const struct rte_ipv4_hdr *ipv4_hdr)
305 cksum = rte_raw_cksum(ipv4_hdr, rte_ipv4_hdr_len(ipv4_hdr));
306 return (uint16_t)~cksum;
310 * Process the pseudo-header checksum of an IPv4 header.
312 * The checksum field must be set to 0 by the caller.
314 * Depending on the ol_flags, the pseudo-header checksum expected by the
315 * drivers is not the same. For instance, when TSO is enabled, the IP
316 * payload length must not be included in the packet.
318 * When ol_flags is 0, it computes the standard pseudo-header checksum.
321 * The pointer to the contiguous IPv4 header.
323 * The ol_flags of the associated mbuf.
325 * The non-complemented checksum to set in the L4 header.
327 static inline uint16_t
328 rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
330 struct ipv4_psd_header {
331 uint32_t src_addr; /* IP address of source host. */
332 uint32_t dst_addr; /* IP address of destination host. */
333 uint8_t zero; /* zero. */
334 uint8_t proto; /* L4 protocol type. */
335 uint16_t len; /* L4 length. */
340 psd_hdr.src_addr = ipv4_hdr->src_addr;
341 psd_hdr.dst_addr = ipv4_hdr->dst_addr;
343 psd_hdr.proto = ipv4_hdr->next_proto_id;
344 if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
347 l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length);
348 psd_hdr.len = rte_cpu_to_be_16((uint16_t)(l3_len -
349 rte_ipv4_hdr_len(ipv4_hdr)));
351 return rte_raw_cksum(&psd_hdr, sizeof(psd_hdr));
355 * @internal Calculate the non-complemented IPv4 L4 checksum
357 static inline uint16_t
358 __rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
361 uint32_t l3_len, l4_len;
364 ip_hdr_len = rte_ipv4_hdr_len(ipv4_hdr);
365 l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length);
366 if (l3_len < ip_hdr_len)
369 l4_len = l3_len - ip_hdr_len;
371 cksum = rte_raw_cksum(l4_hdr, l4_len);
372 cksum += rte_ipv4_phdr_cksum(ipv4_hdr, 0);
374 cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
376 return (uint16_t)cksum;
380 * Process the IPv4 UDP or TCP checksum.
382 * The layer 4 checksum must be set to 0 in the L4 header by the caller.
385 * The pointer to the contiguous IPv4 header.
387 * The pointer to the beginning of the L4 header.
389 * The complemented checksum to set in the L4 header.
391 static inline uint16_t
392 rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
394 uint16_t cksum = __rte_ipv4_udptcp_cksum(ipv4_hdr, l4_hdr);
399 * Per RFC 768: If the computed checksum is zero for UDP,
400 * it is transmitted as all ones
401 * (the equivalent in one's complement arithmetic).
403 if (cksum == 0 && ipv4_hdr->next_proto_id == IPPROTO_UDP)
410 * @internal Calculate the non-complemented IPv4 L4 checksum of a packet
412 static inline uint16_t
413 __rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
414 const struct rte_ipv4_hdr *ipv4_hdr,
420 if (l4_off > m->pkt_len)
423 if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
426 cksum = raw_cksum + rte_ipv4_phdr_cksum(ipv4_hdr, 0);
428 cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
430 return (uint16_t)cksum;
435 * @b EXPERIMENTAL: this API may change without prior notice.
437 * Compute the IPv4 UDP/TCP checksum of a packet.
440 * The pointer to the mbuf.
442 * The pointer to the contiguous IPv4 header.
444 * The offset in bytes to start L4 checksum.
446 * The complemented checksum to set in the L4 header.
449 static inline uint16_t
450 rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
451 const struct rte_ipv4_hdr *ipv4_hdr, uint16_t l4_off)
453 uint16_t cksum = __rte_ipv4_udptcp_cksum_mbuf(m, ipv4_hdr, l4_off);
458 * Per RFC 768: If the computed checksum is zero for UDP,
459 * it is transmitted as all ones
460 * (the equivalent in one's complement arithmetic).
462 if (cksum == 0 && ipv4_hdr->next_proto_id == IPPROTO_UDP)
469 * Validate the IPv4 UDP or TCP checksum.
471 * In case of UDP, the caller must first check if udp_hdr->dgram_cksum is 0
472 * (i.e. no checksum).
475 * The pointer to the contiguous IPv4 header.
477 * The pointer to the beginning of the L4 header.
479 * Return 0 if the checksum is correct, else -1.
483 rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr,
486 uint16_t cksum = __rte_ipv4_udptcp_cksum(ipv4_hdr, l4_hdr);
496 * @b EXPERIMENTAL: this API may change without prior notice.
498 * Verify the IPv4 UDP/TCP checksum of a packet.
500 * In case of UDP, the caller must first check if udp_hdr->dgram_cksum is 0
501 * (i.e. no checksum).
504 * The pointer to the mbuf.
506 * The pointer to the contiguous IPv4 header.
508 * The offset in bytes to start L4 checksum.
510 * Return 0 if the checksum is correct, else -1.
513 static inline uint16_t
514 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
515 const struct rte_ipv4_hdr *ipv4_hdr,
518 uint16_t cksum = __rte_ipv4_udptcp_cksum_mbuf(m, ipv4_hdr, l4_off);
529 struct rte_ipv6_hdr {
530 rte_be32_t vtc_flow; /**< IP version, traffic class & flow label. */
531 rte_be16_t payload_len; /**< IP payload size, including ext. headers */
532 uint8_t proto; /**< Protocol, next header. */
533 uint8_t hop_limits; /**< Hop limits. */
534 uint8_t src_addr[16]; /**< IP address of source host. */
535 uint8_t dst_addr[16]; /**< IP address of destination host(s). */
538 /* IPv6 vtc_flow: IPv / TC / flow_label */
539 #define RTE_IPV6_HDR_FL_SHIFT 0
540 #define RTE_IPV6_HDR_TC_SHIFT 20
541 #define RTE_IPV6_HDR_FL_MASK ((1u << RTE_IPV6_HDR_TC_SHIFT) - 1)
542 #define RTE_IPV6_HDR_TC_MASK (0xff << RTE_IPV6_HDR_TC_SHIFT)
543 #define RTE_IPV6_HDR_DSCP_MASK (0xfc << RTE_IPV6_HDR_TC_SHIFT)
544 #define RTE_IPV6_HDR_ECN_MASK (0x03 << RTE_IPV6_HDR_TC_SHIFT)
545 #define RTE_IPV6_HDR_ECN_CE RTE_IPV6_HDR_ECN_MASK
547 #define RTE_IPV6_MIN_MTU 1280 /**< Minimum MTU for IPv6, see RFC 8200. */
550 * Process the pseudo-header checksum of an IPv6 header.
552 * Depending on the ol_flags, the pseudo-header checksum expected by the
553 * drivers is not the same. For instance, when TSO is enabled, the IPv6
554 * payload length must not be included in the packet.
556 * When ol_flags is 0, it computes the standard pseudo-header checksum.
559 * The pointer to the contiguous IPv6 header.
561 * The ol_flags of the associated mbuf.
563 * The non-complemented checksum to set in the L4 header.
565 static inline uint16_t
566 rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
570 rte_be32_t len; /* L4 length. */
571 rte_be32_t proto; /* L4 protocol - top 3 bytes must be zero */
574 psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24);
575 if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
578 psd_hdr.len = ipv6_hdr->payload_len;
581 sum = __rte_raw_cksum(ipv6_hdr->src_addr,
582 sizeof(ipv6_hdr->src_addr) + sizeof(ipv6_hdr->dst_addr),
584 sum = __rte_raw_cksum(&psd_hdr, sizeof(psd_hdr), sum);
585 return __rte_raw_cksum_reduce(sum);
589 * @internal Calculate the non-complemented IPv6 L4 checksum
591 static inline uint16_t
592 __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
597 l4_len = rte_be_to_cpu_16(ipv6_hdr->payload_len);
599 cksum = rte_raw_cksum(l4_hdr, l4_len);
600 cksum += rte_ipv6_phdr_cksum(ipv6_hdr, 0);
602 cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
604 return (uint16_t)cksum;
608 * Process the IPv6 UDP or TCP checksum.
610 * The IPv6 header must not be followed by extension headers. The layer 4
611 * checksum must be set to 0 in the L4 header by the caller.
614 * The pointer to the contiguous IPv6 header.
616 * The pointer to the beginning of the L4 header.
618 * The complemented checksum to set in the L4 header.
620 static inline uint16_t
621 rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
623 uint16_t cksum = __rte_ipv6_udptcp_cksum(ipv6_hdr, l4_hdr);
628 * Per RFC 768: If the computed checksum is zero for UDP,
629 * it is transmitted as all ones
630 * (the equivalent in one's complement arithmetic).
632 if (cksum == 0 && ipv6_hdr->proto == IPPROTO_UDP)
639 * @internal Calculate the non-complemented IPv6 L4 checksum of a packet
641 static inline uint16_t
642 __rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,
643 const struct rte_ipv6_hdr *ipv6_hdr,
649 if (l4_off > m->pkt_len)
652 if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
655 cksum = raw_cksum + rte_ipv6_phdr_cksum(ipv6_hdr, 0);
657 cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
659 return (uint16_t)cksum;
664 * @b EXPERIMENTAL: this API may change without prior notice.
666 * Process the IPv6 UDP or TCP checksum of a packet.
668 * The IPv6 header must not be followed by extension headers. The layer 4
669 * checksum must be set to 0 in the L4 header by the caller.
672 * The pointer to the mbuf.
674 * The pointer to the contiguous IPv6 header.
676 * The offset in bytes to start L4 checksum.
678 * The complemented checksum to set in the L4 header.
681 static inline uint16_t
682 rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,
683 const struct rte_ipv6_hdr *ipv6_hdr, uint16_t l4_off)
685 uint16_t cksum = __rte_ipv6_udptcp_cksum_mbuf(m, ipv6_hdr, l4_off);
690 * Per RFC 768: If the computed checksum is zero for UDP,
691 * it is transmitted as all ones
692 * (the equivalent in one's complement arithmetic).
694 if (cksum == 0 && ipv6_hdr->proto == IPPROTO_UDP)
701 * Validate the IPv6 UDP or TCP checksum.
703 * In case of UDP, the caller must first check if udp_hdr->dgram_cksum is 0:
704 * this is either invalid or means no checksum in some situations. See 8.1
705 * (Upper-Layer Checksums) in RFC 8200.
708 * The pointer to the contiguous IPv6 header.
710 * The pointer to the beginning of the L4 header.
712 * Return 0 if the checksum is correct, else -1.
716 rte_ipv6_udptcp_cksum_verify(const struct rte_ipv6_hdr *ipv6_hdr,
719 uint16_t cksum = __rte_ipv6_udptcp_cksum(ipv6_hdr, l4_hdr);
729 * @b EXPERIMENTAL: this API may change without prior notice.
731 * Validate the IPv6 UDP or TCP checksum of a packet.
733 * In case of UDP, the caller must first check if udp_hdr->dgram_cksum is 0:
734 * this is either invalid or means no checksum in some situations. See 8.1
735 * (Upper-Layer Checksums) in RFC 8200.
738 * The pointer to the mbuf.
740 * The pointer to the contiguous IPv6 header.
742 * The offset in bytes to start L4 checksum.
744 * Return 0 if the checksum is correct, else -1.
748 rte_ipv6_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
749 const struct rte_ipv6_hdr *ipv6_hdr,
752 uint16_t cksum = __rte_ipv6_udptcp_cksum_mbuf(m, ipv6_hdr, l4_off);
760 /** IPv6 fragment extension header. */
761 #define RTE_IPV6_EHDR_MF_SHIFT 0
762 #define RTE_IPV6_EHDR_MF_MASK 1
763 #define RTE_IPV6_EHDR_FO_SHIFT 3
764 #define RTE_IPV6_EHDR_FO_MASK (~((1 << RTE_IPV6_EHDR_FO_SHIFT) - 1))
765 #define RTE_IPV6_EHDR_FO_ALIGN (1 << RTE_IPV6_EHDR_FO_SHIFT)
767 #define RTE_IPV6_FRAG_USED_MASK (RTE_IPV6_EHDR_MF_MASK | RTE_IPV6_EHDR_FO_MASK)
769 #define RTE_IPV6_GET_MF(x) ((x) & RTE_IPV6_EHDR_MF_MASK)
770 #define RTE_IPV6_GET_FO(x) ((x) >> RTE_IPV6_EHDR_FO_SHIFT)
772 #define RTE_IPV6_SET_FRAG_DATA(fo, mf) \
773 (((fo) & RTE_IPV6_EHDR_FO_MASK) | ((mf) & RTE_IPV6_EHDR_MF_MASK))
775 struct rte_ipv6_fragment_ext {
776 uint8_t next_header; /**< Next header type */
777 uint8_t reserved; /**< Reserved */
778 rte_be16_t frag_data; /**< All fragmentation data */
779 rte_be32_t id; /**< Packet ID */
782 /* IPv6 fragment extension header size */
783 #define RTE_IPV6_FRAG_HDR_SIZE sizeof(struct rte_ipv6_fragment_ext)
786 * Parse next IPv6 header extension
788 * This function checks if proto number is an IPv6 extensions and parses its
789 * data if so, providing information on next header and extension length.
792 * Pointer to an extension raw data.
794 * Protocol number extracted from the "next header" field from
795 * the IPv6 header or the previous extension.
797 * Extension data length.
799 * next protocol number if proto is an IPv6 extension, -EINVAL otherwise
803 rte_ipv6_get_next_ext(const uint8_t *p, int proto, size_t *ext_len)
810 *ext_len = (*p + 2) * sizeof(uint32_t);
813 case IPPROTO_HOPOPTS:
814 case IPPROTO_ROUTING:
815 case IPPROTO_DSTOPTS:
817 *ext_len = (*p + 1) * sizeof(uint64_t);
820 case IPPROTO_FRAGMENT:
822 *ext_len = RTE_IPV6_FRAG_HDR_SIZE;
836 #endif /* _RTE_IP_H_ */