From b1b98f5f5aa2a54d9b383012298334fcccf9acac Mon Sep 17 00:00:00 2001 From: John Lo Date: Sat, 3 Aug 2019 18:25:49 -0400 Subject: vxlan: fix VXLANoIP6 checksum offload setup Fix UDP over IP6 checksum offload setup for VXLAN and VXLAN-GBP. Type: fix Signed-off-by: John Lo Change-Id: If110467a68234d8eed941869a2a03735f339dc33 --- src/vnet/vxlan-gbp/encap.c | 6 +++--- src/vnet/vxlan/encap.c | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/vxlan-gbp/encap.c b/src/vnet/vxlan-gbp/encap.c index 9766d1c3ca1..4bba49af5c8 100644 --- a/src/vnet/vxlan-gbp/encap.c +++ b/src/vnet/vxlan-gbp/encap.c @@ -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) { diff --git a/src/vnet/vxlan/encap.c b/src/vnet/vxlan/encap.c index b797624ae06..eec460d5bc5 100644 --- a/src/vnet/vxlan/encap.c +++ b/src/vnet/vxlan/encap.c @@ -93,10 +93,9 @@ vxlan_encap_inline (vlib_main_t * vm, u8 const underlay_hdr_len = is_ip4 ? sizeof(ip4_vxlan_header_t) : sizeof(ip6_vxlan_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) { -- cgit 1.2.3-korg