5 #ifndef _RTE_IP_FRAG_H_
6 #define _RTE_IP_FRAG_H_
22 #include <rte_config.h>
65 TAILQ_ENTRY(ip_frag_pkt) lru;
66 struct ip_frag_key key;
74 #define IP_FRAG_DEATH_ROW_LEN 32
77 #define IP_FRAG_DEATH_ROW_MBUF_LEN (IP_FRAG_DEATH_ROW_LEN * (IP_MAX_FRAG_NUM + 1))
82 struct rte_mbuf *row[IP_FRAG_DEATH_ROW_MBUF_LEN];
108 struct ip_pkt_list lru;
110 __extension__
struct ip_frag_pkt pkt[0];
114 #define RTE_IPV6_EHDR_MF_SHIFT 0
115 #define RTE_IPV6_EHDR_MF_MASK 1
116 #define RTE_IPV6_EHDR_FO_SHIFT 3
117 #define RTE_IPV6_EHDR_FO_MASK (~((1 << RTE_IPV6_EHDR_FO_SHIFT) - 1))
118 #define RTE_IPV6_EHDR_FO_ALIGN (1 << RTE_IPV6_EHDR_FO_SHIFT)
120 #define RTE_IPV6_FRAG_USED_MASK \
121 (RTE_IPV6_EHDR_MF_MASK | RTE_IPV6_EHDR_FO_MASK)
123 #define RTE_IPV6_GET_MF(x) ((x) & RTE_IPV6_EHDR_MF_MASK)
124 #define RTE_IPV6_GET_FO(x) ((x) >> RTE_IPV6_EHDR_FO_SHIFT)
126 #define RTE_IPV6_SET_FRAG_DATA(fo, mf) \
127 (((fo) & RTE_IPV6_EHDR_FO_MASK) | ((mf) & RTE_IPV6_EHDR_MF_MASK))
129 struct ipv6_extension_fragment {
134 } __attribute__((__packed__));
194 uint16_t nb_pkts_out,
223 struct ipv6_extension_fragment *frag_hdr);
236 static inline struct ipv6_extension_fragment *
239 if (hdr->
proto == IPPROTO_FRAGMENT) {
240 return (
struct ipv6_extension_fragment *) ++hdr;
271 uint16_t nb_pkts_out, uint16_t mtu_size,
308 uint16_t flag_offset, ip_flag, ip_ofs;
311 ip_ofs = (uint16_t)(flag_offset & IPV4_HDR_OFFSET_MASK);
312 ip_flag = (uint16_t)(flag_offset & IPV4_HDR_MF_FLAG);
314 return ip_flag != 0 || ip_ofs != 0;
350 void __rte_experimental