Yes, this is a bug. Thanks for catching it. But the commit log doesn’t tell what issue the patch fixes. Can you add it in the commit log?
Thanks, Jiayu From: Andrew Rybchenko [mailto:[email protected]] Sent: Sunday, January 20, 2019 5:59 PM To: Hu, Jiayu <[email protected]> Cc: [email protected]; [email protected] Subject: Re: [PATCH] gso: fix VxLAN/GRE tunnel checks On 1/19/19 4:31 PM, Hu, Jiayu wrote: Hi Andrew, Would you please give more explanation about the problem that the patch wants to fix? Let's consider if tunnel is IPIP (0x3ULL << 45) or MPLSINUDP (0x5ULL << 45). If so flags & VXLAN (0x1ULL << 45), still makes (0x1ULL << 45)==VXLAN, but it is not a VXLAN tunnel packet. Andrew. Thanks, Jiayu -----Original Message----- From: Andrew Rybchenko [mailto:[email protected]] Sent: Friday, January 18, 2019 9:29 PM To: Hu, Jiayu <[email protected]><mailto:[email protected]> Cc: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits. Fixes: b058d92ea95d ("gso: support VxLAN GSO") Fixes: 70e737e448c7 ("gso: support GRE GSO") Cc: [email protected]<mailto:[email protected]> Signed-off-by: Andrew Rybchenko <[email protected]><mailto:[email protected]> --- lib/librte_gso/gso_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h index 6cd764ff5..b6ff1b886 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)) -- 2.17.1

