From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96859A034E for ; Tue, 18 Jan 2022 14:03:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84C5042720; Tue, 18 Jan 2022 14:03:23 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CBA954068E; Tue, 18 Jan 2022 14:03:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642511000; x=1674047000; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=ys7+nnDa9l1yrhSTY6avKast/2ABzUMXPQHlByvFe5w=; b=EuHNUBAuPuofq5xK/vmrelD6Zkeb8hx7x97d2fWtm6Pc5FWxV7Vc2vfs pm7h6Inr1u8psSMQMkwVjB9XjunDJTxMWN91Z5OiIw1RngM/JNF4ArjNq li99zWAngTnOY4LSFr9PwiET4tlMNmkS/uRWCIG8oAyzx4MQtsHd78AvE WWYyQDicbnirWZK2ODzEB9hW3N3UM/gaz1pALrM8VPGW2DgObrmLFOK63 /wMipJg7edjiW18Z8JmRtwLkt0iXC7vwbOHyrGI0HarZtMRFlIEVLw96v yBE8LrZ67ECJAjiHwF2mjuKba6XGo0vUtG/dm7cUInOsSWbur+cw6PRCG Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="269189972" X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="269189972" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 05:03:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="671832153" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 18 Jan 2022 05:03:18 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 05:03:18 -0800 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 05:03:17 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 18 Jan 2022 05:03:17 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 18 Jan 2022 05:03:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hiGN7mw9NcP2j1CHkNBpcmDdXqb5zlhnMXGNnnpIdRHV7XNfPL7gtbAswEduWzewjKqXNtpWqI27qiKaAWfzy8PQEzDgN+Xqx/MPOSx7IcWqDIZ01hfElv+7PPHdZqpfv2hoMebu+/rmdvepU6iVR2FMWvae7NqfzZ+U35+A7Iib9UrxaLwwj9JliyFlSC2+mcGfNXkJ+u6AhrDX2PgU1MlYH2ox4x3wjIi1MSj4YcQD8saoP0QQQkNdolCcff9OACc/t8ym1ZXxF6HwxdFGp0QeJll5vTPG6xXcumGbJHlcGdKZ9fHSgsPFwwFuLWdeLgqCbCj8m3Yo6SgfT18jNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8whIGWwNb9RS4FZ/k1jV2MrjxG1gfxaplh5Y1SDV6Wo=; b=eNZSEKRRw2zF9+UTZgrqrO8djRe5wFb28mkxtpKe9Ekf6f+01hHFEm6q3CMGiSp8O/7CMEuv8aMYvevZHM4fdoKviDDT5sTFeegMsdEXeWXY2t1e/arcePdacNC0+nqNy/VL7kKQDRRRg5gcsuxyXFcrxrCrU49RPhqDvxtqXTvPRlqPqqPQ2/kRHj4JVe08npTGPD/s2lLVShwNzz6UvegNQVu/bGE5uuT9zQW0QHOyaKsJftcj0U/MZTe1gtzRva52MF92u3ZvsrcFvQkMLTvZCVeAOZ7LAbRSwQW8yJYjq+CXVsb1Nre8yeLnEtGd6/vbG+rarvxuJPCQD4oXGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by DM5PR1101MB2364.namprd11.prod.outlook.com (2603:10b6:3:ab::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Tue, 18 Jan 2022 13:03:15 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4888.014; Tue, 18 Jan 2022 13:03:15 +0000 Message-ID: Date: Tue, 18 Jan 2022 13:03:09 +0000 Content-Language: en-US To: Matan Azrad , Raja Zidane , "dev@dpdk.org" CC: "stable@dpdk.org" References: <20211205034450.7888-1-rzidane@nvidia.com> <4787802c-cefe-6d15-817f-6b906451ded8@intel.com> <6b4a6388-92b7-eeb5-f218-b007199e3ddf@intel.com> From: Ferruh Yigit Subject: Re: [PATCH] app/testpmd: fix GENEVE parsing in csum forward mode X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0038.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::7) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db05dd0e-266d-48c9-31dc-08d9da82e38d X-MS-TrafficTypeDiagnostic: DM5PR1101MB2364:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2UWFB/CD8QTd9zdAQmMJplKgyQn4NRQevnI6FQGSeiwzC/cMxRmXeo99xLsob7K5IQk1k3nGk1Kn6WsMIpByrDx9qz7zZVFv4rEZdpH+koOX92xY12ArqXHQyOFozSiNOj0ILaMJgXLGGfkoG3lLbO2x6sU3Svh3QA4bxPlOV58YYzZ49D0Nevr3QqmILECPOWAKtK5g/4KG8ErzXL5nrTP3WR5OyZByVYU9/CEpMkZNpZ3bBGeLCWzkiWc5pNyZGm3l4/+R6maTX4h4BedjT8eZ9vSWvdqIOvRhIM95i4gy/rRc/YHMu9SVArX1wKOQRqJlMUpAeA8e3cso/Qj7OMY9Eaj1CM2GdseqEhpbaSxT3DMaW45DYGim00D9kCapXHGtcvOTd8JUxy6hGoQN5NvM/T+1SvwcBryl0oAiyLhP8pUUsS/Zn2vNBCf7WCqQMMk+nd78E0EMmc+KCM3ZkKqhAyqg6x2NklM1JUXAYwzJjI6NvHVnK2ly/UBdS/GJcZijfv5NIpVt4i0sojsP3RKBXH16DpcGnzXxrhNfV/9d70U/MpIM1koJWe1Md5vLZM052CNiHmky76Xx6Ybkkq6QyS0OEwd1GlBYQC5UftBrkKsbdFvrR9bTUTZ22hw/B9hx+79PVacqvOm1pIgKvGMvbKmRHTXdyZXrLIvjVKbz6gm2j5T/Ln8dvG3G8O+5ZRi008Y/ognvcwdBqGsHaA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(53546011)(6666004)(36756003)(316002)(6506007)(83380400001)(86362001)(66946007)(66556008)(31686004)(31696002)(38100700002)(2906002)(6512007)(66476007)(44832011)(8676002)(8936002)(26005)(5660300002)(508600001)(6486002)(110136005)(2616005)(4326008)(186003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aUJZQWhJSW56Z0tqUEYwdEpwajVadUc1Vk1UWE9XdFNBMXZEbzNCUkRhTWdG?= =?utf-8?B?eXRnQ1puYytsc28vamFOS1NYZlMzd0Z2b0FSUVpKRUdoVUxNaS95RDBuZDBJ?= =?utf-8?B?dkcrbzRoRnlUcXQyb1IwVXZIR3V6YURTRmprc1pTSWdQZEo0VGlkMVlkR1Zq?= =?utf-8?B?ajUzL296L0t1R1NYYXJKalJMcE5KZzlya2svcjgyVjBQNGtnbUpSelZvNEZT?= =?utf-8?B?UzkzOWtHb25ST0xKdVIxN1BLZUc4UlpNMGJJSElSd3k4UmdXM2lFTDZVelJq?= =?utf-8?B?RWFlMVJZVWxwaEdZcmhEdHhMK2hhZE9sZzVDNkNtelh5cWl6TEt2aTZ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BqUEpTcVUwaENQcVVrMU5WejZpVlYxNHUycnQwZi9QcXlj?= =?utf-8?Q?AqMu47kSX1zpVIiee4n0bYk=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: db05dd0e-266d-48c9-31dc-08d9da82e38d X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 13:03:15.0107 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GatQioJ9Mwd6NFUtq30ytXfCcdKxkU6fyvqudyelWJQkLCddTjILwCET6rLuqyjNz9XJ0MfwJnbBp/ulUiAXcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2364 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 1/18/2022 12:55 PM, Matan Azrad wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Tuesday, January 18, 2022 2:28 PM >> To: Matan Azrad ; Raja Zidane ; >> dev@dpdk.org >> Cc: stable@dpdk.org >> Subject: Re: [PATCH] app/testpmd: fix GENEVE parsing in csum forward mode >> >> External email: Use caution opening links or attachments >> >> >> On 1/18/2022 11:27 AM, Matan Azrad wrote: >>> >>> >>>> -----Original Message----- >>>> From: Ferruh Yigit >>>> Sent: Tuesday, January 18, 2022 11:52 AM >>>> To: Raja Zidane ; dev@dpdk.org >>>> Cc: Matan Azrad ; stable@dpdk.org >>>> Subject: Re: [PATCH] app/testpmd: fix GENEVE parsing in csum forward >>>> mode >>>> >>>> External email: Use caution opening links or attachments >>>> >>>> >>>> On 12/5/2021 3:44 AM, Raja Zidane wrote: >>>>> The csum FWD mode parses any received packet to set mbuf offloads >>>>> for the transmitting burst, mainly in the checksum/TSO areas. >>>>> In the case of a tunnel header, the csum FWD tries to detect known >>>>> tunnels by the standard definition using the header'sdata and >>>>> fallback to check the packet type in the mbuf to see if the Rx port >>>>> driver already sign the packet as a tunnel. >>>>> In the fallback case, the csum assumes the tunnel is VXLAN and >>>>> parses the tunnel as VXLAN. >>>> >>>> As far as I can see there is a VXLAN port check in 'parse_vxlan()', >>>> why it is not helping? >>>> >>> >>> The problem is not the vxlan check but the tunnel type in mbuf that caused the >> packet to be detected as vxlan(default) before checking GENEVE tunnel case. >>> >> >> Check is as following: >> >> if (udp_hdr->dst_port != _htons(RTE_VXLAN_DEFAULT_PORT) && >> RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0) >> return; >> >> Do you what is the intention for the "RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0" >> check? >> Why vxlan parsing doesn't stop when it is not default port? > > Maybe some drivers set the tunnel type for vxlan packets coming after non-standard vxlan port. > But checking the tunnel flag to say that it is vxlan is too broad, isn't it? And this is the problem you are having. Can there be any way to detect and check non-standard vxlan port? >> >>>>> When the GENEVE tunnel was added to the known tunnels in csum, its >>>>> parsing trial was wrongly located after the pkt type detection, >>>>> causing the csum to parse the GENEVE header as VXLAN when the Rx >>>>> port set the tunnel packet type. >>>>> >>>>> Locate the GENEVE parsing trial before the packet type detection. >>>>> >>>>> Fixes: ea0e711b8ae0 ("app/testpmd: add GENEVE parsing") >>>>> Cc: stable@dpdk.org >>>>> >>>>> Signed-off-by: Raja Zidane >>>>> --- >>>>> Acked-by: Matan Azrad >>>> >>>> Ack should be before '---' to be part of the commit log, otherwise it >>>> is dropped when applied as comment. >>>> >>>>> app/test-pmd/csumonly.c | 16 ++++++++++------ >>>>> 1 file changed, 10 insertions(+), 6 deletions(-) >>>>> >>>>> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index >>>>> 2aeea243b6..fe810fecdd 100644 >>>>> --- a/app/test-pmd/csumonly.c >>>>> +++ b/app/test-pmd/csumonly.c >>>>> @@ -254,7 +254,10 @@ parse_gtp(struct rte_udp_hdr *udp_hdr, >>>>> info->l2_len += RTE_ETHER_GTP_HLEN; >>>>> } >>>>> >>>>> -/* Parse a vxlan header */ >>>>> +/* >>>>> + * Parse a vxlan header. >>>>> + * If a tunnel is detected in 'pkt_type' it will be parsed by default as vxlan. >>>>> + */ >>>>> static void >>>>> parse_vxlan(struct rte_udp_hdr *udp_hdr, >>>>> struct testpmd_offload_info *info, @@ -912,17 +915,18 @@ >>>>> pkt_burst_checksum_forward(struct fwd_stream *fs) >>>>> RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE; >>>>> goto tunnel_update; >>>>> } >>>>> - parse_vxlan(udp_hdr, &info, >>>>> - m->packet_type); >>>>> + parse_geneve(udp_hdr, &info); >>>>> if (info.is_tunnel) { >>>>> tx_ol_flags |= >>>>> - RTE_MBUF_F_TX_TUNNEL_VXLAN; >>>>> + >>>>> + RTE_MBUF_F_TX_TUNNEL_GENEVE; >>>>> goto tunnel_update; >>>>> } >>>>> - parse_geneve(udp_hdr, &info); >>>>> + /* Always keep last. */ >>>>> + parse_vxlan(udp_hdr, &info, >>>>> + m->packet_type); >>>>> if (info.is_tunnel) { >>>>> tx_ol_flags |= >>>>> - RTE_MBUF_F_TX_TUNNEL_GENEVE; >>>>> + >>>>> + RTE_MBUF_F_TX_TUNNEL_VXLAN; >>>>> goto tunnel_update; >>>>> } >>>>> } else if (info.l4_proto == IPPROTO_GRE) { >>> >