From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 4B2B81E33; Sun, 20 Jan 2019 10:59:01 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id DC3CD980066; Sun, 20 Jan 2019 09:58:59 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 20 Jan 2019 09:58:54 +0000 To: "Hu, Jiayu" CC: "dev@dpdk.org" , "stable@dpdk.org" References: <1547818111-21817-1-git-send-email-arybchenko@solarflare.com> From: Andrew Rybchenko Message-ID: Date: Sun, 20 Jan 2019 12:58:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24376.003 X-TM-AS-Result: No-13.218800-8.000000-10 X-TMASE-MatchedRID: HXSqh3WYKfsOwH4pD14DsPHkpkyUphL9OhJ9m53n4aCHwGEm+CpYGYy9 bZLB2g0gw2qjZkiJKdLVwfmM7kNGWATI9DBbkEFqrz6KEvj1EHIbTwzYj2zQut9RlPzeVuQQhkq HjOW3mkOkRgEg7nrRyuutPg6r34pTgiIO7Sf/7rE00dkxYNMRt4n4DdeD/uLNw7+XQ3Lk9nkahn O4XreYZkAGsuRpDYyrt4yMn+rBDs6th0SEvC6c1AcbMHjYNxGhhZApJAdFDDabKItl61J/ycnjL TA/UDoAoTCA5Efyn8AiEOZmeUqhz3XIM2cbQ+ctaK+8uMRQ3P1muGXsdnnID/wydcElYjkQSMLM Mbg+yLsQV8qF/1SIOIfW0X5cmymLIoRYUrSvfpHvocLYaSBkMWgGZNLBHGNe X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--13.218800-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24376.003 X-MDID: 1547978340-TYkWZ4QjIrp1 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] gso: fix VxLAN/GRE tunnel checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2019 09:59:01 -0000 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:arybchenko@solarflare.com] >> Sent: Friday, January 18, 2019 9:29 PM >> To: Hu, Jiayu >> Cc: dev@dpdk.org; stable@dpdk.org >> 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: stable@dpdk.org >> >> Signed-off-by: Andrew Rybchenko >> --- >> 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