interface: fix interface_types.api enums
[vpp.git] / src / vnet / vxlan-gbp / encap.c
index 9766d1c..a606b89 100644 (file)
@@ -101,9 +101,9 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
   u8 const underlay_hdr_len = is_ip4 ?
     sizeof (ip4_vxlan_gbp_header_t) : sizeof (ip6_vxlan_gbp_header_t);
   u16 const l3_len = is_ip4 ? sizeof (ip4_header_t) : sizeof (ip6_header_t);
-  u32 const csum_flags = is_ip4 ?
-    VNET_BUFFER_F_OFFLOAD_IP_CKSUM | VNET_BUFFER_F_IS_IP4 |
-    VNET_BUFFER_F_OFFLOAD_UDP_CKSUM : VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
+  u32 const csum_flags = is_ip4 ? VNET_BUFFER_F_OFFLOAD_IP_CKSUM |
+    VNET_BUFFER_F_IS_IP4 | VNET_BUFFER_F_OFFLOAD_UDP_CKSUM :
+    VNET_BUFFER_F_IS_IP6 | VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
 
   while (n_left_from > 0)
     {
@@ -309,6 +309,10 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
                udp1->checksum = 0xffff;
            }
 
+         /* save inner packet flow_hash for load-balance node */
+         vnet_buffer (b[0])->ip.flow_hash = flow_hash0;
+         vnet_buffer (b[1])->ip.flow_hash = flow_hash1;
+
          vlib_increment_combined_counter (tx_counter, thread_index,
                                           sw_if_index0, 1, len0);
          vlib_increment_combined_counter (tx_counter, thread_index,
@@ -451,6 +455,9 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
                udp0->checksum = 0xffff;
            }
 
+         /* save inner packet flow_hash for load-balance node */
+         vnet_buffer (b[0])->ip.flow_hash = flow_hash0;
+
          vlib_increment_combined_counter (tx_counter, thread_index,
                                           sw_if_index0, 1, len0);
          pkts_encapsulated++;