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 09DB3423AE; Wed, 11 Jan 2023 15:18:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E05440E25; Wed, 11 Jan 2023 15:18:20 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id E8F5F40A7D for ; Wed, 11 Jan 2023 15:18:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673446699; x=1704982699; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=9Jrp+yISl8fvbGURTu/lsGLPVEc6THFdrF0TvN2vbf8=; b=athvvJkWfoTmK73xqlVii5/FqyFd6o5WAzyNcWr0a4A4QMDOLFQ3q6EE pSYacOY4khymcGKIYTetEcFvOK47j5iC0YR2ilK8aJtaeHCs4a61h4p4G 0DgwSsY/sDtb4NXIT1vCtmlhq0OYnBS6uOLTiTVdOzdHotJ/BYMuoKzrq kSv00CA/Ux9c5lI7NDK7tqqVzdgddB9NNLKAVNbUG0lD5YVFT6UMDZuyS xalz/aToWgtbSut6lNLsnUyX54VyWn8DKFbW3A/eq1epBhoqYqc38SL0z 7PldVDJY9YqHad7Mpoqva/65Vlf/HKcxrHFwy9w1I5Jft/b1vakZORtXm w==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="322121393" X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="322121393" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 06:18:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="986174950" X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="986174950" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 11 Jan 2023 06:18:17 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 11 Jan 2023 06:18:17 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 11 Jan 2023 06:18:16 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 11 Jan 2023 06:18:16 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 11 Jan 2023 06:18:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M2t1QK4EPYRjz1SSpREGMyPLZjiPyRl23R6lyeNm8iyT6X19Xa8v5r4bsFy9Rd6wKMyqW5yrwKd1ft5ckXf94A1KEJeINDaD82/9KFDBaNaFqK8CCfM6ISfLuNhEjJIjfLFJ6guAQkOv98oSIJmGlpcYW5JQx4LZj5lAfv3R+QHF32YvNCUgEgAFaQpysFdyD6vJ6cJP85SjokevcCbuRsMu63BOe28oevnwYZUwQsfy6gAZEY/X0dMjE0sDFvsZTBuouT1b3hmDJBP2mQZwjfW0MrHc77Lf35+vTN9kbGiUSXs4WLzx29aDuCA1GXEsl4d8CqAUK48wLnpwARDIhA== 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=v7Cwju89X+/nqh80R8rXyXt4sq9GUT7p058ia7D3R+Y=; b=Mi1+0dtIeu80iTkYsm7cIX67uch5WqmW/JS9vGJYepsbuKAfSujl9usKTuhVomreiPFZYjYC3ST0qgAFJB0L1Ru0SAXSOd6+/QRHTPiAqpC/hVSoG3/w+KWMBJMk40tFTcysfjsH8flkZnI/r/7o7TtMEV2QdELwxdhk/KPua8ybiMY0fbnEPuzcOk7vwscS2DHWHipuWQDoIg9/geWLcP6UfnMPv9Ney8fkCE3E1eU07C7qYnVaDG17nh4RM+AOztonOEeo/3gFkAn1I2YOqj4XkSR9LXOJcKvOKU9Lw+aj71IzbDJz51Utq6m5k4oarxeGBxdDJ8u6Jo426Zdr6A== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CH3PR11MB7180.namprd11.prod.outlook.com (2603:10b6:610:148::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Wed, 11 Jan 2023 14:18:15 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%8]) with mapi id 15.20.5986.018; Wed, 11 Jan 2023 14:18:15 +0000 Date: Wed, 11 Jan 2023 14:18:09 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: Tyler Retzlaff , Subject: Re: RFC abstracting atomics Message-ID: References: <20230109225604.GA25566@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20230110201033.GC21476@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <98CBD80474FA8B44BF855DF32C47DC35D87651@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D87656@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87656@smartserver.smartshare.dk> X-ClientProxiedBy: DB6PR0202CA0018.eurprd02.prod.outlook.com (2603:10a6:4:29::28) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CH3PR11MB7180:EE_ X-MS-Office365-Filtering-Correlation-Id: ce699271-c79a-4ea2-7c05-08daf3dead7f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oSckqrXqdH6om42TbI/ahwTvgxEerjMoupboy8fkp5n6eKEXU004sqVnPUVc6qeBQHvrRbQkUg1+PxCEQjNSLr6vBo+hg/ZDqvBpQnDPHZQMjBRCwFduQilmDETX2VInNjZ5lcEggfFD17B+bY4FdxOz8GC9pev2zlzqkHZWiMDrz6t0QipZqPkivLTukBzK7XI7Nw+Rp8Yav2LCaPkcFxooJwxuxylAeu4F/3CPaS+H8NiML/WtULV+gHV4ps25oI2zlilgOejyB1RJJqu1UXrhx5m0/JBsVH7yfHySFELTU5T6Y/uZEkGzNdD1b2fpxJn5gs4AuqOS2zoUaQd874QzzqlbQyb0Su9RMxPuPJzxtIJnsA74oikrZs5NzJie8bd2owqZD+ziegIFtuYW61aq2FiZ1x75UUXNBi9KBADwtUllfMj9vVsP6oH5uWURmnttQ8xDE+i6//uxGi5WAGOXjD4fRny6Vm47sw3Eb8XbKJN37qyJNp2Vyi4nCPGdNWPGo3/WSr6OgqQbrHWXo/CgCSdTMrPiYjzhBHOrQ/RW4bbjX2MKVEAP/PWuuSxQDBTjV9JgSTzGenxsOdi7kqLGVLEajQ3jJc/i3WOq3fz/DT8+MMa6IcGOe3GVbNJKMxhVfjr6UonsCo8f3xjZjA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(39860400002)(366004)(376002)(136003)(396003)(451199015)(8936002)(2906002)(5660300002)(41300700001)(44832011)(66574015)(316002)(4326008)(66556008)(8676002)(6916009)(7116003)(66476007)(66946007)(26005)(6512007)(38100700002)(86362001)(186003)(83380400001)(3480700007)(82960400001)(6506007)(6666004)(478600001)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?+yfZpNJePRc2FB2lcb80Ib3GUXmPIzhjMRu54ZugGpru+s8eo4abtwjWVf?= =?iso-8859-1?Q?cqlCq8280jFc+HVHr5jQzx9Ejy3jsQJugQEAuBMw/W1ANOU2CingHLB4xK?= =?iso-8859-1?Q?KqBvx74F1Ovj/wjOw3ooDprnZeKmOCNsjNFzeWpMTWuwV5v8C4UOsaO84i?= =?iso-8859-1?Q?jFehAhrJb6G4u9mzPYSLansn/lnAyZe2lAXNzQaTIJESfqSzx6zKbsuGSF?= =?iso-8859-1?Q?JZKrQ6YSr1Y/pLDj/iGWrciiOtlsDrOwKqJo012lunMM7JLKqRECDeP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NDLBUB38tivoRMdmRro5Gi94Cm6AwqaVgz7cyK?= =?iso-8859-1?Q?NUSdv2b/dNdaFCNMVjsWFzk1WsmtdaM/jAEyKBlgn9TrDBPE1n9e2Q7enU?= =?iso-8859-1?Q?7cJsOMQsJj5gTCbnEqacVsYIQ+J12HCyjAgLm4SSa6vx0x6acf+pg3Slk7?= =?iso-8859-1?Q?d2yfYbYI137DRemo+2eY7cUAD2LwtOyRnIY1GfrIuz/SnvJhI2hMhlo15d?= =?iso-8859-1?Q?9WJ1S/J+g4Tn2P3wRe63Ge/JERdrDsvX0N6zrf/M+eyyx91XTyUOLdugZt?= =?iso-8859-1?Q?znYxXlQGHnlKC2+HYSHeCZ09LxVCVMBL+FR+LDafNLMXT79lgMuWfWJbDn?= =?iso-8859-1?Q?s7R8SFsVxR8qlovXu7PMqWy9GxuxA/gg9zPFXltb8k0qJGxjR2XBvUuWhv?= =?iso-8859-1?Q?mhiGrV7H/C41pqgM2KzMRmNKgMiLJ5/fty7pJ+KAVRrK3Qm8KluubesZbR?= =?iso-8859-1?Q?k0kQz43YnUE0gTd2Qyh9QqVFKxXWDVZaTIF+bmhAg+Owi92MvAO6HqUQ?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: ce699271-c79a-4ea2-7c05-08daf3dead7f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2023 14:18:15.0918 (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: Y0Wkii3g9rXvr7i1kWVgmF94njzDA6dSpHz6BAWbmpsdwxl9aiif2A/tJZrxXRyVJR9zfYsvqsn5PRHBdCOiq9+X2RNMERVBIsvPVnAiSh0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7180 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 On Wed, Jan 11, 2023 at 01:46:02PM +0100, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Wednesday, 11 January 2023 12.57 > > > > On Wed, Jan 11, 2023 at 11:23:07AM +0100, Morten Brørup wrote: > > > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > > > Sent: Wednesday, 11 January 2023 11.10 > > > > > > > > One additional point that just became clear to me when I started > > > > thinking > > > > about upping our DPDK C-standard-baseline. We need to be careful > > what > > > > we > > > > are considering when we up our C baseline. We can mandate a > > specific > > > > compiler minimum and C version for compiling up DPDK itself, but I > > > > think we > > > > should not mandate that for the end applications. > > > > > > Why not? > > > > > > And do you consider this backwards compatibility a build time or run > > time requirement? > > > > > > > > > > > That means that our header files, such as atomics, should not > > require > > > > C99 > > > > or C11 even if the build of DPDK itself does. More specifically, > > even > > > > if we > > > > bump DPDK minimum to C11, we should still allow apps to build using > > > > older > > > > compiler settings. > > > > > > > > Therefore, we probably need to maintain non-C11 atomics code paths > > in > > > > headers beyond the point at which DPDK itself uses C11 as a code > > > > baseline. > > > > > > Am I misunderstanding your suggestion here: Code can be C11, but all > > APIs and header files must be C89? > > > > > > Wouldn't that also prevent DPDK inline functions from being C11? > > > > > Yes, it would. > > > > Now, perhaps we don't need to ensure that our headers have strict C89 > > compatibility, but I think we need to be very careful about mandating > > that > > end-user apps use particular c standard settings when compiling their > > own > > code. > > I get your point, Bruce, but I disagree. > > There should be a limit for how backwards compatible we want DPDK to be, and the limit should certainly not be C89. It might be C99 for a while, but it should soon be C11. > > If someone is stuck with a very old C compiler, and already rely on (extended) LTS for their compiler and runtime environment, why would they expect bleeding edge DPDK to cater for them? They can use some old DPDK version and rely on DPDK LTS. > > If you want to use an old compiler, you often have to use old libraries too, as new libraries often require newer compilers. This also applies to the Linux kernel. I don't see why DPDK should be any different. > > But... DPDK LTS is only two years!?! My point is: What you are describing is not a DPDK problem, it is a DPDK LTS policy problem. > I don't see it as a compiler problem, but as a codebase one. It doesn't matter if your compiler supports C11 if your codebase is using legacy features from C89 that are no longer supported by later versions. Changing compilers can be tricky, but updating a large legacy code-base is a much more challenging proposition. There is a lot of old code out there in the world! That said, I would hope that there are few large codebases out there that won't compile with a C99 or C11 standard language level, and there aren't that many things that should cause problems. However, I don't really know for sure, so urge caution. /Bruce