5 #ifndef _RTE_IP_FRAG_H_
6 #define _RTE_IP_FRAG_H_
22 #include <rte_config.h>
57 TAILQ_ENTRY(ip_frag_pkt) lru;
58 struct ip_frag_key key;
66 #define IP_FRAG_DEATH_ROW_LEN 32
69 struct rte_ip_frag_death_row {
97 struct ip_pkt_list
lru;
99 __extension__
struct ip_frag_pkt
pkt[0];
103 #define RTE_IPV6_EHDR_MF_SHIFT 0
104 #define RTE_IPV6_EHDR_MF_MASK 1
105 #define RTE_IPV6_EHDR_FO_SHIFT 3
106 #define RTE_IPV6_EHDR_FO_MASK (~((1 << RTE_IPV6_EHDR_FO_SHIFT) - 1))
108 #define RTE_IPV6_FRAG_USED_MASK \
109 (RTE_IPV6_EHDR_MF_MASK | RTE_IPV6_EHDR_FO_MASK)
111 #define RTE_IPV6_GET_MF(x) ((x) & RTE_IPV6_EHDR_MF_MASK)
112 #define RTE_IPV6_GET_FO(x) ((x) >> RTE_IPV6_EHDR_FO_SHIFT)
114 #define RTE_IPV6_SET_FRAG_DATA(fo, mf) \
115 (((fo) & RTE_IPV6_EHDR_FO_MASK) | ((mf) & RTE_IPV6_EHDR_MF_MASK))
117 struct ipv6_extension_fragment {
122 } __attribute__((__packed__));
182 uint16_t nb_pkts_out,
211 struct ipv6_extension_fragment *frag_hdr);
224 static inline struct ipv6_extension_fragment *
227 if (hdr->
proto == IPPROTO_FRAGMENT) {
228 return (
struct ipv6_extension_fragment *) ++hdr;
259 uint16_t nb_pkts_out, uint16_t mtu_size,
296 uint16_t flag_offset, ip_flag, ip_ofs;
299 ip_ofs = (uint16_t)(flag_offset & IPV4_HDR_OFFSET_MASK);
300 ip_flag = (uint16_t)(flag_offset & IPV4_HDR_MF_FLAG);
302 return ip_flag != 0 || ip_ofs != 0;