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: b058d92ea9 ("gso: support VxLAN GSO")
Fixes: 70e737e448 ("gso: support GRE GSO")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
This commit is contained in:
Andrew Rybchenko 2019-01-21 06:42:38 +00:00 committed by Thomas Monjalon
parent 8e0c8dcf35
commit 727663e88b

View File

@ -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))