On Thu, 14 Dec 2017 10:49:39 +0800 Jiayu Hu <jiayu...@intel.com> wrote:
> + > +static inline int > +is_same_vxlan_tcp4_flow(struct vxlan_tcp4_flow_key k1, > + struct vxlan_tcp4_flow_key k2) > +{ > + return (is_same_ether_addr(&k1.outer_eth_saddr, &k2.outer_eth_saddr) && > + is_same_ether_addr(&k1.outer_eth_daddr, > + &k2.outer_eth_daddr) && > + (k1.outer_ip_src_addr == k2.outer_ip_src_addr) && > + (k1.outer_ip_dst_addr == k2.outer_ip_dst_addr) && > + (k1.outer_src_port == k2.outer_src_port) && > + (k1.outer_dst_port == k2.outer_dst_port) && > + (k1.vxlan_hdr.vx_flags == k2.vxlan_hdr.vx_flags) && > + (k1.vxlan_hdr.vx_vni == k2.vxlan_hdr.vx_vni) && > + is_same_tcp4_flow(k1.inner_key, k2.inner_key)); Maybe this could be optimized with memcmp because many of the fields are contiguous.