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 AB22943B08; Tue, 13 Feb 2024 16:45:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B6E1409FA; Tue, 13 Feb 2024 16:45:18 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2071.outbound.protection.outlook.com [40.107.102.71]) by mails.dpdk.org (Postfix) with ESMTP id 0F681402D8 for ; Tue, 13 Feb 2024 16:45:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOyqnpn7ifqbo38a8LQzhxWYqJi7evAeMeMT7WJCctyOYbzLfJZ/oqcOztmQ3PmWvTnR7aQT9ga06m/iRkOXTUnxSp1xTDyrS0XvO3rU3F+LfeeamQkCKEGo7QvfsUOAnwRbDyvfCOlLAx7VhtNdv6DwFlw+Ey5adrGF1kXXkEW4TDIvl+7X2jnaRUa1NtOlmRz3FJlAS9DBOmU6L0EH8wvxET0rbF8F1nttj+83z9SQ+z1l7+M4dZbZoplUG4hKVTZa8rVsfa8k6ITPp08ycakRet1n/4Db8ubHkCOqsv/yy8jjzAJwc8FKjRWBIpa1i+utr94yKdq7Ave6kijWgg== 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=iuQ1XtfaZAsCgQRlbcDpSYIlKdWhFx06eMLr0TIBeB8=; b=D5C+AC6OSznRgMjOeweyV9fOVYPuiPlFjRkRbGll1qFCJuaVXfxnKCrlYcE9B/wucNpvKqeSczI7t+wPmEBBQzQ2iKkMmluKG3/OougU2PD0zy7uXaNcFmi7OTM6NhSyMW2epIHZv+YYJWjLYuTSz6uNpyX3HWgxeV+bV17X6GK66ad2bk0erghUg71mS/ZXpvIYLjAox2bzdZVG8YzziYU5peU2yyNKqldZliWfErDh974OKxTSCavKoRXlMIjnSuxQVCAymKKHu3iw9g28ue9ExQ9AgeOMdoLIBzgW60x75jvKwEz5RanD7DZ575QDvFKGsKY7JW2JflSOpb/jSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iuQ1XtfaZAsCgQRlbcDpSYIlKdWhFx06eMLr0TIBeB8=; b=eXoK22enTvtRq5o+ZssVTxtm9A4O4mSVgsLHFm8pGZDbupKLm6gCDU6tVpCn3likZDXWNi6BojkFm4UYkrDi/rj0y8VRHqCH2I/ziXAAhmrOxcd3KAKch1BLrUcluMIx9/3/kRLM/neBBhM7QMgXpmCA8YUBAG0b0ylpnYRq+p0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5230.namprd12.prod.outlook.com (2603:10b6:5:399::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25; Tue, 13 Feb 2024 15:45:10 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%4]) with mapi id 15.20.7292.022; Tue, 13 Feb 2024 15:45:10 +0000 Message-ID: Date: Tue, 13 Feb 2024 15:45:05 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/4] ethdev: introduce encap hash calculation Content-Language: en-US To: Ori Kam , dsosnowski@nvidia.com, cristian.dumitrescu@intel.com, andrew.rybchenko@oktetlabs.ru, stephen@networkplumber.org, Thomas Monjalon Cc: dev@dpdk.org, rasland@nvidia.com References: <20240128093943.4461-1-orika@nvidia.com> <20240213141640.19812-1-orika@nvidia.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRT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ZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240213141640.19812-1-orika@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP265CA0073.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5230:EE_ X-MS-Office365-Filtering-Correlation-Id: 76f2276d-fab1-4705-d5c4-08dc2caac2a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8oF0Wanp1ZUnainHHN0QhyeBnzEd36QOQNpkjb+MgKh5vyjJoHciVRjfE3ZNYYdMymezZUzDVLlRuzuDBuU8XJyjYdw+WezOvmDFlYS1ldgklL9WvmfoieCaqS1CSth1Gm3EZnsgQhoueVbEUn3jvWy1etKZZapBDyNBDjrlD0uLZEaqgGjZubwT2VVyZvf4tBxDnxLJNckZo0N1VU+WTc+L+xWmvE2te/lfgTAZ9xW4VMqK6t/yqubFIzt9A3IUHr31CWfVRd0RNbwkz1Boln9LlRGwoKWMw98UoNvZ6ITPQumiLfVRTdhEGz3dKJ22BMv85yFd3KQOtWRfMeuE89jP5mG99amYt5hCWr8VRRqzBlgpPaKSMAGwytrYJCDyE0xzDN4521YH5OCPq4YaphEa1M3PHFX2urK/GyZriX8vbzGKTItGaElq+5cph9p0M9XrvYuXBrpj3WBd/AgfVVS6CVnXh1WAaZCRNfxODQ87zGFqYB3DTEzGLN8sA5FsZWYuWRj9CxQvW9rA1NQsiSRcwjqGxvsmm9OM9WD4cJyWknmrSo/HslVokufTzjGc X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(6512007)(6486002)(478600001)(31686004)(41300700001)(110136005)(8676002)(8936002)(4326008)(44832011)(2906002)(5660300002)(6506007)(53546011)(6666004)(66556008)(66946007)(316002)(66476007)(2616005)(86362001)(31696002)(26005)(36756003)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MzRGN0MyZWJRblVnNkhQbmswWlBNSE5XZzBBd2UyV2VZMVcwOUc4Q1NtVmxn?= =?utf-8?B?RDlucDB2bFdHL1E3WC90V3J3RmFKTkRhN3JuWFV3MVZMS3JZcmtUWjJiVC9y?= =?utf-8?B?UGtuRWJUUERVKy95K1NaSnZqeVhmWXZlV3dLZGtnbFY0dXlFSEZGc2E3eFla?= =?utf-8?B?OGRucWRMTDF5VTJsU1NzVkJkQno5NnU0WG5XSS84YVRqK0prVGZqczFiRkhR?= =?utf-8?B?Q3JlWE4wbFNEOEZDMjdUS0hwVXdaWUxWWmx4Ky9aT1Awb1pudG5SYm50aGNo?= =?utf-8?B?WDVoL2VjUnBkNmFrL204S1lIeWtjQnkxTmhhcFhjOXh1akc1WHVxMkFmVi9V?= =?utf-8?B?NCtsWTBlOTlYZFBrN09ORFJHclFGUkpzdzRtaTh6QlM0Sm54R01mMmZzRVhH?= =?utf-8?B?WnNTT3R4Zi8xY3RCQVFDR0x3L0pldXIrNWJ0YVNuT2g2VzhKVndSc0ZubW1m?= =?utf-8?B?V0QxRDJXakZoN1lTTmovTU0wUjc0ZUpmS2ttN0JuOS9JUXRtNHcybG1ZNE0w?= =?utf-8?B?UEUydXJCZSs3aUJBa29mRHppVThSamdQaG91TC9mWjY5YzJkRDRoc1hMMDMw?= =?utf-8?B?MEJBYjVqcGYwS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utf-8?B?MWNuK0hFTFVXZG5ZVEdqQldDdzRqZTk4Mmh1SWdiOWJLRnRGNDRBNCtGa3dQ?= =?utf-8?B?dno5RStaWGtxUXZhMWdZdURNNUM2eHdLWUtjUDQrR1Y4R2EyeURsNGlPMUo2?= =?utf-8?B?WXVrR1R6WGkyRVJWemRSYVdhVHgxb3dXOE1Kd0lqbE9Yc2hMSXI2K0RJUEVm?= =?utf-8?B?OUtQR0pGK0FnaG9BVnhpL0dGZHo2NHV5NnJ0UzJTTmx2TXNLV2VLck1DMjFk?= =?utf-8?B?cForc1ZXaUZweHRhUDlkWlQyYVhxaDQwNjdpVnA1VENLRHZoejIxZ2dJMTgv?= =?utf-8?B?MVU1N21JRGF5T0piOTRxcXZuZHFPUTUxbHFrcW5WYjVXWnV1OHNFNENiQjEw?= =?utf-8?B?OWd2M3I1TlB1dTVjUVRqeVJtWVp0R1c4cVVBaFVSd0JXd3dNOE1mMUFoNUFC?= =?utf-8?B?K3pFYmpwNHRvdjBFeTVNVHUrQWp1eUFhZyswUE1VRmM4RWM3ZlZJMGx6STFv?= =?utf-8?B?Vk8ybU1oQ0VwTG5CeXphL0Z1dk5IWUVKR1pEM1oveUtzRE1FMEtwTEpoOGhO?= =?utf-8?B?SjRGZ3luV1pTK085NWIwYitlTTh3QkZnUjBBKzkwZEFpT3ZkamxmTmRSVHQ2?= =?utf-8?Q?Btcyl2KmuJba12Qep/DsCx18m?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76f2276d-fab1-4705-d5c4-08dc2caac2a9 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2024 15:45:10.4074 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1BjISJ02dKo5xl+lY0+lzipywk3XfBikMZJL0U8FLyRcbJW5LFofseGPNs/wT/Xh X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5230 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/13/2024 2:16 PM, Ori Kam wrote: > During encapsulation of a packet, it is possible to change some > outer headers to improve flow destribution. > For example, from VXLAN RFC: > "It is recommended that the UDP source port number > be calculated using a hash of fields from the inner packet -- > one example being a hash of the inner Ethernet frame's headers. > This is to enable a level of entropy for the ECMP/load-balancing" > > The tunnel protocol defines which outer field should hold this hash, > but it doesn't define the hash calculation algorithm. > > An application that uses flow offloads gets the first few packets > (exception path) and then decides to offload the flow. > As a result, there are two > different paths that a packet from a given flow may take. > SW for the first few packets or HW for the rest. > When the packet goes through the SW, the SW encapsulates the packet > and must use the same hash calculation as the HW will do for > the rest of the packets in this flow. > > the new function rte_flow_calc_encap_hash can query the hash value > from the driver for a given packet as if the packet was passed > through the HW. > > Signed-off-by: Ori Kam > Acked-by: Dariusz Sosnowski > Acked-by: Ferruh Yigit