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 35D024564F; Fri, 19 Jul 2024 12:42:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23C5842E8C; Fri, 19 Jul 2024 12:42:09 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mails.dpdk.org (Postfix) with ESMTP id 9B32342E7B for ; Fri, 19 Jul 2024 12:42:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721385727; x=1752921727; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Pq+qaFP/LiZ3kJ/KoQ66uXpTdvyS6GnWn70RPxiwc1Q=; b=G3bgAaacQXTf0VUwXmKQwyyBFjIBzPfbQMrpeZVAdu7CRGZanO2XYkIy 24Yh3YC9arQFoOeoV6VEPhzA8pHjKyAxW3NMloObTaOF+tRdooJo0hQ/o sK997C9SwTjIF4QmtiwLFP3x+FX2Mgm/R3tVsYCyyJAuKmmUTuaYy3atz psg5n9dMOnkrOkXPe8P01gX0j6ataqw65SYrL6YoxNcM7nyRUBm3wP1Wj PnL9ud2LrI6z1AA2W0L565RVw1cNe2feeyRaSeCWhKKhY5uSsW8g9Wt+J b4U/IYvdU+x7zJ+Z24wuMByqhhppI2s44IXPA27JKxtvmmD1DEWR+FLAg g==; X-CSE-ConnectionGUID: yiFWwQrGRNWk3t9AVCt3oQ== X-CSE-MsgGUID: ymY3Uvw0RNGJCpQx5Qbs5Q== X-IronPort-AV: E=McAfee;i="6700,10204,11137"; a="29604663" X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="29604663" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2024 03:42:02 -0700 X-CSE-ConnectionGUID: 0vtEH+f6QF+pY6M0OGiEEw== X-CSE-MsgGUID: +60TX89aRemaT/98rRsRqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="51352095" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Jul 2024 03:42:02 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 19 Jul 2024 03:42:00 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 19 Jul 2024 03:42:00 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.41) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 19 Jul 2024 03:41:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YEw8Fq7iaCOpJsf13J+tmjY6FyWf6AaHubRGsfym/LdNeK0GM9VknhzKvaDiifg7+4dBkgtUQEqyGPcDX3zgkw8vRmT+hpe+y9LD2se1qmRAtWOKA7e6/SSAIJDVl2TYizL9Kl5RVxJBRxyh3WV8ln2c6/UFbyXGhOtUKJMNBT8qUxL6fKb1U+R5M5sF53Wvl2bMLzxdZMGIXJwp7uzKJ50navfFA/mTZ7pEnWtGF+ZhDK7ro1AfcWwpsQTf4njLmA+eTblZU5/KJfiCVtRa1q3Ln2PdN6S1AY5v8aPc98w9+0pxjRMKbak74HXGAK1D9PLUm5dvkYHEhdQUKodaag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pMjOL9nrRx6cqEm/7ntQjHgT525Gv0iKt0tV79BXZjI=; b=uRxktFf+iiAUGT/ItPqkZQKtRGJosze2J3HYMnd1wTfjfFUQPO3Bm70puyaE6Ee94OP5+3esO8Wb5eeq/vTyfDwPQk38RLk3agO4fNoo+nSdapcnBW9Gypd6761kJjhcs+Wz8kNnsFODLmsZ501qleqeEGy3AsC9vkYjAJLNc1W8f4tMVK+uH8OXISfZ4rl/gUwSkjXgBqg/BzVnKkTPNeJ4tkH13fqKgfrjNdnZ6HWmPWtAhCleHMzfIU8Bl5/v+V58RN/CfHQWveZxdtR7CxesttjCrCu8ERscCXz8NE10w4j1HZp34W2NR2A2zl5IqBjGhfXxgQ/pOujmQtmQfA== 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 PH7PR11MB5765.namprd11.prod.outlook.com (2603:10b6:510:139::7) by SA1PR11MB8521.namprd11.prod.outlook.com (2603:10b6:806:3ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.32; Fri, 19 Jul 2024 10:41:25 +0000 Received: from PH7PR11MB5765.namprd11.prod.outlook.com ([fe80::fcf5:d65c:4fdd:4a2a]) by PH7PR11MB5765.namprd11.prod.outlook.com ([fe80::fcf5:d65c:4fdd:4a2a%5]) with mapi id 15.20.7762.027; Fri, 19 Jul 2024 10:41:25 +0000 Message-ID: <948634d8-d201-4a3f-80dd-72b01a551f44@intel.com> Date: Fri, 19 Jul 2024 11:41:12 +0100 User-Agent: Mozilla Thunderbird Subject: Re: IPv6 APIs rework To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , Robin Jarry , Vladimir Medvedkin , CC: , Sunil Kumar Kori , Rakesh Kudurumalla , Wisam Jaddo , "Cristian Dumitrescu" , Konstantin Ananyev , Akhil Goyal , Fan Zhang , Bruce Richardson , Yipeng Wang , Sameh Gobriel , Nithin Dabilpuram , "Kiran Kumar K" , Satha Rao , "Harman Kalra" , Ankur Dwivedi , "Anoob Joseph" , Tejasree Kondoj , Gagandeep Singh , Hemant Agrawal , Ajit Khaparde , Somnath Kotur , Chas Williams , "Min Hu (Connor)" , Potnuri Bharat Teja , Sachin Saxena , Ziyang Xuan , Xiaoyun Wang , Jie Hai , Yisen Zhuang , Jingjing Wu , Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Chaoyong He , "Devendra Singh Rawat" , Alok Prasad , "Andrew Rybchenko" , Jiawen Wu , Jian Wang , "Thomas Monjalon" , Ferruh Yigit , Jiayu Hu , Pavan Nikhilesh , "Maxime Coquelin" , Chenbo Xia References: <98CBD80474FA8B44BF855DF32C47DC35E9F5AB@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35E9F5AC@smartserver.smartshare.dk> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F5AC@smartserver.smartshare.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DUZPR01CA0110.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::7) To PH7PR11MB5765.namprd11.prod.outlook.com (2603:10b6:510:139::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR11MB5765:EE_|SA1PR11MB8521:EE_ X-MS-Office365-Filtering-Correlation-Id: 734b56bd-f334-4489-89ba-08dca7df56bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L2xQdEpnT3poZXNLZi9uVDkyZDlndUIrMmE0YnRqZlRoQUlPMTlvMUh2YlNa?= =?utf-8?B?NE5TMFRVVTYvSlNCT2JpWWIvaHRTeDYyU25GcHQ1Z1VaK1pVSlBacDdUZ0pJ?= =?utf-8?B?akV4bmhmNFBPVGx5emg4eXpMei9neFJIV05lM2w3RS8wMWVUY2RHaWkxcDJP?= =?utf-8?B?NElsdTAwNWFVc2JOQlNleW5RazZhbEtrOFBkeHE0cll6RGVwU2dNaENJS09y?= =?utf-8?B?NWhwLzlHZ1htbXVRcXRJemVITVlSbVNGK1VDa3BvanR3cmF0VXhSdzBWVTc2?= =?utf-8?B?ejlCSWgzSjJlM1FJZkZoNnRYbUtWTjN1dDFqbmxzK1RYZmRBWWl4RkZwYXhz?= =?utf-8?B?TjRaRGdLbW9ZNFl1Mjc1cGhIT0xVSndEbnVXbzE2RzhNQ2hrWGJZUzJDV2JB?= =?utf-8?B?UGwvOXdST1BscnpidDFXQUJEcStlOG9Uc1RFdXhqakVBYWxZeDZGN1FpRHU2?= =?utf-8?B?Tmh1VDNQaVFMenlrUmlqbEZoay8yUnhwL1lPTXlWQS9ycjdpRHdBT0xSUkFZ?= =?utf-8?B?clBmU0c2aGRLc0tPeitCaFhyQUQxcUV6Z3ZMQmxwN0UxZ0djMHZ3Y3FVTy9k?= =?utf-8?B?R05PaXYxbWlYRDBUdDA4NUsvZWczMmZkWXVlRWd3K0Z4MEhFYXV0RVFxOGY0?= =?utf-8?B?azQ4dlpqdUNKSXNXMFBYQjh0UzBMaXYxaUN5RjhRR0xUbE5tSXhqaWxmcFY3?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LcjFU?= =?utf-8?B?RUVLMkd6eUhDYkVqakpNYkpiQmFnWmlOUXdXc2RZbVA0Qis4QUo3TXd5L3pD?= =?utf-8?B?ZzZuY2UyZVF3c2hrejhGRjBGR29Sdm5qU1JBaW81dlczeFgrVzJMOFRLby96?= =?utf-8?B?Zk5sWHN3UzNYTWorZW5BdFhMMjJuK1VsWllBL0dUK1NFcG84d0VXMEsvUDUy?= =?utf-8?B?VnRsOGhFL1VwV0t6cHVNUT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB5765.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(7416014)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SGZMQitzY0luUlJxVmExT0xTQWh3WUE3ZVN6TWxELzRsMnYzMGxxMzZWaVZL?= =?utf-8?B?aEFxRkFKaUR6cTRNV0swdEFVbWdoYlg2aFZpZFB3UTdWSXNqQyt3Tk9DNkNo?= =?utf-8?B?M1p0b3BKY2FjalNKTTFCdUxGN0p4cnd0QlQvN0I2aFZPNkc4Z0ZoOTJQbStF?= =?utf-8?B?eU5nSjArVTZlZVRrMmNHVVRMVjlCSno1NHB4ekE2YjBOWGIzb2lHemZNUjQ2?= =?utf-8?B?V014eUpRNk80Mk1TcVYxZG01OXNRSTdSNXpqWEo3bGdORWZUWndaMUVUcngx?= =?utf-8?B?cFpNaEttTTgzN2dSWGUxYWhRU3ZINkQyTzJxRkVlS0FJNVVielFFdEpRU0c0?= =?utf-8?B?MzhZNVFUOFdEbXp1ZDVqcWJBS3dEODFsTUY3ZkZSWnM3NmJ4YjQ1ZzdKSmZz?= =?utf-8?B?cTVkOUFWOEFMUWNWZHpkV2o0ZDJhTSt6RFV6cjQvY28xcXpyNGZMZnlsdUZ1?= =?utf-8?B?dDB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com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 10:41:25.7189 (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: NJ4oBDABuUhNV22ZBzVTFspCdRF0P62ExAzygAvXcqedFgYbivPh8+pQbfEmFy4GQ4OGzlo61oJTqjCpw/iJBhzsA70pVG+k2lDtNNEZO/8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8521 X-OriginatorOrg: intel.com 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 Hi Morten, On 19/07/2024 10:12, Morten Brørup wrote: >> From: Robin Jarry [mailto:rjarry@redhat.com] >> >> Vladimir Medvedkin, Jul 18, 2024 at 23:25: >>> I think alignment should be 1 since in FIB6 users usually don't copy >> IPv6 >>> address and just provide a pointer to the memory inside the packet. > How can they do that? The bulk lookup function takes an array of IPv6 addresses, not an array of pointers to IPv6 addresses. > > What you are suggesting only works with single lookup, not bulk lookup. You're right, sorry, confused with an internal implementation that passes an array of pointers >> Current >>> vector implementation loads IPv6 addresses using unaligned access ( >>> _mm512_loadu_si512) so it doesn't rely on alignment. >> Yes, my intention was exactly that, being able to map that structure >> directly in packets without copying them on the stack. > This would require changing the bulk lookup API to take an array of pointers instead of an array of IPv6 addresses. > > It would be acceptable to introduce a new single address lookup function, taking a pointer to an unaligned (or 2 byte aligned) IPv6 address for the single lookup use cases mentioned above. > >>>> 2. In the IPv6 packet header, the IPv6 addresses are not 16 byte >> aligned, >>>> they are 8 byte aligned. So we cannot make the IPv6 address type 16 >> byte >>>> aligned. >>> Not necessary, if Ethernet frame in mbuf starts on 8b aligned address, >> then >>> IPv6 is aligned only by 2 bytes. >> We probably could safely say that aligning on 2 bytes would be OK. But >> is there any benefit, performance wise, in doing so? Keeping the same >> alignment as before the change would at least make it ABI compatible. > I'm not worried about the IPv6 FIB functions. This proposal introduces a generic IPv6 address type for *all of DPDK*, so you need to consider *all* aspects, not just one library! > > There may be current or future CPUs, where alignment makes a performance difference. Do all architectures support unaligned 128 bit access at 100 % similar performance to aligned 128 bit access? I think not! > E.g. on X86 architecture, load/store across a cache boundary has a performance impact. If the type is explicitly unaligned, an instance on the stack (i.e. a local variable holding an IPv6 address) might cross a cache boundary, whereas an 128 bit aligned instance on the stack is guaranteed not to cross a cache boundary. > > The generic IPv4 address type is natively aligned (i.e. 4 byte). When accessing an IPv4 address in an IPv4 header following an Ethernet header, it is not 4 byte aligned, so this is an *exception* from the general case, and must be treated as such. You don't want to make the general type unaligned (and thus inefficient) everywhere it is being used, only because a few use cases require the unaligned form. > > The same principle must apply to the IPv6 address type. Let's make the generic type natively aligned (16 byte). And you might also offer an explicitly unaligned type for the exception use cases requiring unaligned access. > -- Regards, Vladimir