From: Andrew Rybchenko Date: Mon, 21 Jan 2019 06:42:38 +0000 (+0000) Subject: gso: fix VxLAN/GRE tunnel checks X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=727663e88b3fbaa8183499a1b415f02b0a689319;p=dpdk.git gso: fix VxLAN/GRE tunnel checks Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits. As the result, for example, IPIP or MPLSinUDP tunnel packets may be incorrectly treated internally as VXLAN. Fixes: b058d92ea95d ("gso: support VxLAN GSO") Fixes: 70e737e448c7 ("gso: support GRE GSO") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Acked-by: Jiayu Hu --- diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h index 6cd764ff5f..b6ff1b886d 100644 --- a/lib/librte_gso/gso_common.h +++ b/lib/librte_gso/gso_common.h @@ -22,12 +22,12 @@ (PKT_TX_TCP_SEG | PKT_TX_IPV4)) #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \ - PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \ + PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \ (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \ PKT_TX_TUNNEL_VXLAN)) #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \ - PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \ + PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \ (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \ PKT_TX_TUNNEL_GRE))