40 #ifndef included_ip_ip6_inlines_h
41 #define included_ip_ip6_inlines_h
59 ((
ip->protocol == IP_PROTOCOL_TCP)
60 || (
ip->protocol == IP_PROTOCOL_UDP)))
63 tcp = (
void *) (
ip + 1);
65 else if (
ip->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS)
68 if ((hbh->
protocol == IP_PROTOCOL_TCP) ||
77 t1 = (
ip->src_address.as_u64[0] ^
ip->src_address.as_u64[1]);
78 t1 = (flow_hash_config & IP_FLOW_HASH_SRC_ADDR) ? t1 : 0;
80 t2 = (
ip->dst_address.as_u64[0] ^
ip->dst_address.as_u64[1]);
81 t2 = (flow_hash_config & IP_FLOW_HASH_DST_ADDR) ? t2 : 0;
83 a = (flow_hash_config & IP_FLOW_HASH_REVERSE_SRC_DST) ? t2 : t1;
84 b = (flow_hash_config & IP_FLOW_HASH_REVERSE_SRC_DST) ? t1 : t2;
86 t1 = is_tcp_udp ? tcp->src : 0;
87 t2 = is_tcp_udp ? tcp->dst : 0;
89 t1 = (flow_hash_config & IP_FLOW_HASH_SRC_PORT) ? t1 : 0;
90 t2 = (flow_hash_config & IP_FLOW_HASH_DST_PORT) ? t2 : 0;
92 if (flow_hash_config & IP_FLOW_HASH_SYMMETRIC)
108 b ^= (flow_hash_config & IP_FLOW_HASH_PROTO) ?
protocol : 0;
109 c = ((flow_hash_config & IP_FLOW_HASH_REVERSE_SRC_DST) ? ((t1 << 16) | t2) :
151 done = (next_proto == find_hdr_type);
161 if ((!
ip6_ext_hdr (next_proto)) || next_proto == IP_PROTOCOL_IP6_NONXT)
163 if (find_hdr_type < 0)
167 if (next_proto == IP_PROTOCOL_IPV6_FRAGMENTATION)
169 ip6_frag_hdr_t *frag_hdr = (ip6_frag_hdr_t *) next_header;
174 exthdr_len =
sizeof (ip6_frag_hdr_t);
175 temp_nxthdr = next_header + exthdr_len;
177 else if (next_proto == IP_PROTOCOL_IPSEC_AH)
181 temp_nxthdr = next_header + exthdr_len;
187 temp_nxthdr = next_header + exthdr_len;
189 next_proto = ((ip6_ext_header_t *) next_header)->next_hdr;
190 next_header = temp_nxthdr;
191 cur_offset += exthdr_len;
213 ip6_address_t *
src, ip6_address_t *
dst,
221 ASSERT (flow_label < 1 << 20);
223 clib_host_to_net_u32 ((0x6 << 28) | flow_label);
227 payload_length -=
sizeof (*ip6h);
238 b->
flags |= VNET_BUFFER_F_IS_IP6 | VNET_BUFFER_F_L3_HDR_OFFSET_VALID;
256 ip6_address_t *
src, ip6_address_t *
dst,
int proto)