16 #ifndef included_vnet_handoff_h
17 #define included_vnet_handoff_h
30 hash_key = *((
u64 *) (&
ip->address_pair)) ^
ip->protocol;
40 hash_key =
ip->src_address.as_u64[0] ^
48 #define MPLS_BOTTOM_OF_STACK_BIT_MASK 0x00000100U
49 #define MPLS_LABEL_MASK 0xFFFFF000U
62 goto bottom_lbl_found;
69 goto bottom_lbl_found;
76 goto bottom_lbl_found;
83 goto bottom_lbl_found;
90 goto bottom_lbl_found;
100 ip_ver = (*((
u8 *) m) >> 4);
131 (
u64) (
ip->src_address.as_u32 ^
132 ip->dst_address.as_u32 ^
ip->protocol);
134 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
137 hash_key = (
u64) (
ip->src_address.as_u64[0] ^
138 ip->src_address.as_u64[1] ^
139 ip->dst_address.as_u64[0] ^
140 ip->dst_address.as_u64[1] ^
ip->protocol);
142 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS))
148 ((h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN))
149 || (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_DOT1AD))))
153 outer = (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN)) ?
156 clib_host_to_net_u16 (ETHERNET_TYPE_IP4))
160 (
u64) (
ip->src_address.as_u32 ^
161 ip->dst_address.as_u32 ^
ip->protocol);
163 else if (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
167 (
u64) (
ip->src_address.as_u64[0] ^
ip->src_address.as_u64[1] ^
168 ip->dst_address.as_u64[0] ^
169 ip->dst_address.as_u64[1] ^
ip->protocol);
171 else if (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS))
177 hash_key = outer->
type;
197 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
201 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS))
205 else if ((h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN)) ||
206 (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_DOT1AD)))
210 outer = (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN)) ?
213 clib_host_to_net_u16 (ETHERNET_TYPE_IP4))
217 else if (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
221 else if (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS))
227 hash_key = outer->
type;