summaryrefslogtreecommitdiff
path: root/lib/librte_gso
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchenko@solarflare.com>2019-01-21 06:42:38 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-01-22 17:08:21 +0100
commit727663e88b3fbaa8183499a1b415f02b0a689319 (patch)
tree099d95be67bfeadf26ce7d1ae4484d0094adc2ef /lib/librte_gso
parent8e0c8dcf3507ae812f1abcd5247617917f131dae (diff)
downloaddpdk-727663e88b3fbaa8183499a1b415f02b0a689319.zip
dpdk-727663e88b3fbaa8183499a1b415f02b0a689319.tar.gz
dpdk-727663e88b3fbaa8183499a1b415f02b0a689319.tar.xz
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 <arybchenko@solarflare.com> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Diffstat (limited to 'lib/librte_gso')
-rw-r--r--lib/librte_gso/gso_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 6cd764f..b6ff1b8 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))