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 72DEBA034F; Wed, 5 May 2021 02:38:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFD4640040; Wed, 5 May 2021 02:38:02 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50040.outbound.protection.outlook.com [40.107.5.40]) by mails.dpdk.org (Postfix) with ESMTP id 492BF4003C for ; Wed, 5 May 2021 02:38:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jUo/L9cFyxMTd7+qpCvlQxEscta3SoD/w/hHnFj/v8o=; b=9mo+jiU/TqP3sVPf2PIiZJ3KN3RvpUSe5uflnwsdoaw6Ry9FmV/1UL3sLdDrmSJhOHXUUGto0866vto16yOYjKtuzL4o6rerY2P6JljsJQKkXQMGF08ClbzPfwzxSfHNqr82YIOY2XsjBKE0hisTTcHtJ9ypSw2z2wJ1lDxgTK0= Received: from AM5PR04CA0029.eurprd04.prod.outlook.com (2603:10a6:206:1::42) by PAXPR08MB6704.eurprd08.prod.outlook.com (2603:10a6:102:130::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.40; Wed, 5 May 2021 00:38:00 +0000 Received: from AM5EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:1:cafe::2a) by AM5PR04CA0029.outlook.office365.com (2603:10a6:206:1::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 5 May 2021 00:37:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT030.mail.protection.outlook.com (10.152.16.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Wed, 5 May 2021 00:37:59 +0000 Received: ("Tessian outbound aff50003470c:v91"); Wed, 05 May 2021 00:37:58 +0000 X-CR-MTA-TID: 64aa7808 Received: from 186118526e8f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A57507E2-405B-4E7D-BB6B-146D9779E1A1.1; Wed, 05 May 2021 00:37:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 186118526e8f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 05 May 2021 00:37:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMAnlderBA1eDh0PTnkbwek4zfoFW23qpDCz12CgYT8wwpzGe758p7jJg7Rh1Vx0sHiDCCshtqElyMPzDrtmMwuE4SCHItBPcw4vh4rB010dJQlXyOIi0CWOgpmWoQA0x6O7mt7e92fqqoxsGfpBoGUC/ZOqX/OpyP3kmkRuBu8GvJWWRZ3shI4BkTLyjy7bShKvHCZWVv+acRoiAm0Ab5Vs+88z/PTvMTftt08Evx9lkBgKPDIXENWyVYSocY1x9CUL7TzAGjOHiyMG5dZ91EjSzz4j9Yj/4KLQH1CZYSghyj7EQrNexdIh2t+YsKa/Fbawk73dWxt/J93Vlbhh2Q== 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-SenderADCheck; bh=jUo/L9cFyxMTd7+qpCvlQxEscta3SoD/w/hHnFj/v8o=; b=eq2iXvvgOsi3pxJpoDANF4Nl/q6Niqc71v+xi1yyeYjrdabFiHTUX7Pz++MFjAxZT2ygt6H3DCUgTDfEGFd4v45kJ7vfNFw2g1bAR1hTiSD2wtm6RLKAfgyBgjTWNn87E0OuQ6iEIL0D/TTq98f/QveNVkIkjjZ+1QA4MgTatLv6F2xdheXzzAZX8OccK34jfWeqP5x7hEwhGkMKdzKZSSBmEVaQ4uDb9S563I622AJwaQS9S2hmqBguzZYew6pKVjNnyHG2f8eS3VcTyshYqrvpMktDYT63jGGu3oQZzc0jMLf1Bz2K1v5gUp7s0rJQjRsSj3ecYjHzcO1RDjmDWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jUo/L9cFyxMTd7+qpCvlQxEscta3SoD/w/hHnFj/v8o=; b=9mo+jiU/TqP3sVPf2PIiZJ3KN3RvpUSe5uflnwsdoaw6Ry9FmV/1UL3sLdDrmSJhOHXUUGto0866vto16yOYjKtuzL4o6rerY2P6JljsJQKkXQMGF08ClbzPfwzxSfHNqr82YIOY2XsjBKE0hisTTcHtJ9ypSw2z2wJ1lDxgTK0= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB9PR08MB6700.eurprd08.prod.outlook.com (2603:10a6:10:2a3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 00:37:52 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e%7]) with mapi id 15.20.4087.044; Wed, 5 May 2021 00:37:51 +0000 From: Honnappa Nagarahalli To: Tyler Retzlaff CC: Joyce Kong , "thomas@monjalon.net" , "david.marchand@redhat.com" , Ruifeng Wang , "dev@dpdk.org" , nd , Honnappa Nagarahalli , nd Thread-Topic: [dpdk-dev] [PATCH v1] test/ticketlock: use C11 atomic builtins for lcores sync Thread-Index: AQHXPSpyd3IqPWgjJ0i2SYRXyHCPu6rL3LsQgAAHgwCAABMUcIABP8yAgAbZ/8A= Date: Wed, 5 May 2021 00:37:50 +0000 Message-ID: References: <20210421071733.17794-1-joyce.kong@arm.com> <20210429190358.GG21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210429193854.GH21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210430155147.GA24271@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20210430155147.GA24271@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 519E75753C2A2748A37669C5975A719E.0 x-checkrecipientchecked: true Authentication-Results-Original: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.13.105] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: d9277f81-7f4d-4a4a-e3bb-08d90f5e087f x-ms-traffictypediagnostic: DB9PR08MB6700:|PAXPR08MB6704: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: t5GVcGaAcFCahQjBi9AMpTLlyYxooiiOii6cp8VHsCTIrf/lCWDa+QAb0M1c4aIdZJvy8nvALlwUzupSzW31R6aVDP8qvy6qP/ewoEucKr1zb21Np31K6kIS6n2n0BrTSE+FG6DoUk7d9rbfri3CDd2sv7B+DjPCyX81z8ZFxcph9eY2eAotSGHfeUpkxNMx4ZNMWUWrVjctkrNbDTZoq3/2iAjP9A59S0+x46ZrYAJeWh+jfnTOAin5Ud8zWjiDrOp6c6IZEKsz6nNmUry+Ipq6O6gz7FIsDbjoUsn9r5C1txR0epRcyMNm656xi3rpt5vJTm6K+QQk3h1z1y43yiNRzUs0E0IgFulVaYNBoMBLyrgP0Tm0QVwMRS1eLj6wXGVVuVLw79Lj9LIkkyGAOO+rMAFnA5Fu1STWznoHNdx6pT8vTKxy3Z6Qx0dYc0oSMc8610KxAxKa3hTD7JQU8DjmLlY7O5t0aoJPBKfdQDwx0nKWihrQQAMN8jHLRFVzsuqPQGcpNf49I3/l+dPVTAeO2UTNRZi+tFVSe438YWKK+9IzHjBAGJf33Uh+blBESebKTY9h5Evd+W2tyG6RBc+aLAamLX59qY7bYMz5wPg6CZ+t8ZT/fk23091H22DshOnJfvdkWz1yK/ZfzJSXXbszz95lr1dtBvv4TJUmTTK1X3fFBX6vmoI6/Ja6tvbV X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39850400004)(346002)(366004)(396003)(376002)(966005)(8936002)(55016002)(6506007)(86362001)(8676002)(7696005)(4326008)(26005)(52536014)(478600001)(5660300002)(71200400001)(38100700002)(64756008)(186003)(66476007)(83380400001)(66556008)(66946007)(76116006)(316002)(6916009)(33656002)(122000001)(54906003)(9686003)(2906002)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?nbHk4W5eP76/3uqRviDimA3B184vJF4touk2arrsYsLzgCuJgy/OxkMujWNk?= =?us-ascii?Q?8V6VMlBGLg6wjdc9zeSGmPiCZ+T9J/bYs1So8iitOkQz9qwd65qmvEZrxlxM?= =?us-ascii?Q?tOH1DntJWycDdHIpTTE0Ik77Bw7c6fb+HpDDsrljitk7xHJAuTytLQ8XJLbf?= =?us-ascii?Q?aK1VoiawdqNMlQ9QSwt2DPOwmV7Sy2274ML/yPcq0XEPYesM+zPX1d1vddnd?= =?us-ascii?Q?6kew2ELVvhb1xGNJD0UUCHYwoAaKUjH7bOYo3pZh2fTZejI/A5F/1pqLiiuO?= =?us-ascii?Q?cnnHpjdyJJw8qKw+KbDtv4pE7Jxb8K2fhAq61cFe+g6tpkdJhyJY85mvp+xU?= =?us-ascii?Q?ksp/lry0i3gteIyK19GGMn490CkzBIky2PK+jxZxtfw52kEOket9DWiuSth3?= =?us-ascii?Q?d2JAJYKOUmvZTrIyZ5w0A+9P76gnvXvyHoeY0lQqHFz9fSBgfpqk1+emqY0j?= =?us-ascii?Q?b13OoIg7vlLIbkqa//jlWRA+TXmsNYwWKjta1t7nA55X8wz9R/E5D8Ou6wMM?= =?us-ascii?Q?FOFRw4gBLgozFQ08aECcPm5y4carl3t/ooiK8CY3u8EHMoKCb4ZaOjLdr6lG?= =?us-ascii?Q?EhXrxY+pxDLllbG7lDFNWEy5XGbLTLPVyyZYJZzrlt/5FdivuivjsHCvxchi?= =?us-ascii?Q?JaSnV3fdd1O+m/QlVJeO7SY9Eo5Lo58ne/eTugFRblcElVWkdRBwNaikCvzx?= =?us-ascii?Q?8qgBbKZmG/llXeiOArs6Sy/rSrvPZbjixVHF9tKEaZvcdhudyOhdxY9LjqXP?= =?us-ascii?Q?pGt1Z/EdhAiYDAr3IF0blhwU3umI6Qc7U6UZnbpLVoNFRp0GUSPDKons0234?= =?us-ascii?Q?gGCgwi9O6y+xcq0Wn2qCnuIvPgfVJISldZoAL7LtpRVqsCC8GspMpMOGUOJ9?= =?us-ascii?Q?5dWeFLipP/lRkETWyMhTCKElTVqXXcH2OkPtLJuL1lkVmMa+uOXC96VGX0ri?= =?us-ascii?Q?TvFdX21YcXERFWpiD/cHLL4Hnmxtf3wBLdFc95hb9ejLqGHIUH8vWkDL9qKy?= =?us-ascii?Q?Ps6905PVRkSVFLs1B9e7EDfnVmeaWhuPV8rgZmavikFiyST7lblzlBnfNk9k?= =?us-ascii?Q?kG3iZtYA9z1kfV7IpGPuQUF7AILiAzlrdJBielVpBflKv9is/kY2f2DpwhcF?= =?us-ascii?Q?Y7vycIhkQwrsZh8ZB3jshCqCW3/tYuMsOOmSprJ66L3rRsin2HbcUFR2Wi3I?= =?us-ascii?Q?wU8C+ISefGKtjaYmax/BCVM5SF0rHQA100Euk5OZya7jd8O5ke9J5pA7Rify?= =?us-ascii?Q?tcwv2Uyk82Tarbcv27HyzNmwgX0NEFNO4PMfQnGsbSzO2yOxCRxm2duSB/91?= =?us-ascii?Q?ti6IEBsEPwzArIgaegfEDdMP?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6700 Original-Authentication-Results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a69dffb8-43c8-42cc-d253-08d90f5e03d8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oHH0715a+0i66FGyzSvlXJFKGRGEnOk5fmLT5opq/TbbAYZYEjeBgFy0v403lPZmpSFD/7+yPKBGQPErzzQUjHFALAE+GeM+6Un9x+k3QxRjRxPOTgOPwqvgYj+ExobIDhAYtfTI1z8EGz2b1hBhc0Zbkupq6NERg+GcMr0hImxJy/zE7uhZXI3JMhYNnM5zls3QwRj1tILPeLEskIt4qVuy9AzBPrLA6qA37i18d6Y8Kyrfe7ARb0NASMONrQH40yz7eAtjDZSOni9fqkb+miDXNltlE/VKfQbFqLzcM/99/eVj68ww9MGfEWBn28atlng8oR2ReXqC1tvr+tOks9r+y+srsAvwajkgWdm3pKgdw21oD1PwHgeCpLnpab9oYr9tiip6AqZGWlPE7tDqyripKdWI2wJTEsqnoWTZmxK7cWI6xe54M6UrPUFubMTxJptqTVKA/Sxs9iRgkSVa07up8OQJ9sQp5zTcrNZP3h3lIIB3QjuBn6hCqSeZRvcyEHkV6390UCsVkcOLPy+MC//PE46wSUM0AAB58/xJULlXe6b7l3gqPtla4ompLh9gLDVBvxve+yusYTP3zezX/lO1rTxwNOx8wHQPalltzz/GWbpaEBVxILOrWM3M6Z54xT0SPcurMfkvdLMNgDFGjx5Sw5W2jtgN97HmR6785A8FEroyOukWaiZsFTS4n9wdU355qa6cV+M1UWb02h/NhkeRK8io45fO9cs0+0tkJqg= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(136003)(39850400004)(396003)(346002)(376002)(36840700001)(46966006)(5660300002)(86362001)(82310400003)(81166007)(52536014)(36860700001)(478600001)(8936002)(47076005)(6862004)(33656002)(83380400001)(8676002)(82740400003)(7696005)(54906003)(966005)(356005)(70206006)(26005)(336012)(4326008)(55016002)(70586007)(9686003)(186003)(316002)(6506007)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 00:37:59.3047 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9277f81-7f4d-4a4a-e3bb-08d90f5e087f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6704 Subject: Re: [dpdk-dev] [PATCH v1] test/ticketlock: use C11 atomic builtins for lcores sync 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 Sender: "dev" > > > > > > your subject line indicates the use of C11 which is a standard [1]. > > > > > > the patch itself uses gcc atomics builtins which are not part of C11 > > > standard so the subject line is incorrect and misleading. > > Ok, understood. How about the following? > > "use gcc's C11 atomic built-ins for lcore synchronization" >=20 > drop 'C11' from it and it describes the actual change >=20 > > > > > > > > [1] http://www.open- > std.org/jtc1/sc22/wg14/www/standards.html#9899 > > > > > > > > > > > Not sure if these compilers are supported in DPDK. DPDK officially > > > > supports > > > gcc, clang (not sure on icc). > > > > > > dpdk may incorporate support for other compilers in the future so > > > unless there is substantive justification for moving to > > > non-standard/non-portable code i'm asking that this change not be mad= e > as it will complicate those future efforts. > > There is some history [1] behind why we are doing this. I guess new > compiler support needs to be discussed in the future. > > > > [1] > > https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory- > model/ >=20 > thanks for the reference. it seems this documents explicitly states the c= hoice > to not use C11 stdatomic.h and the basis of that choice appears to be to > support old versions of gcc. >=20 > it doesn't seem particularly forward looking to reduce future compiler > portability to support old versions of gcc thereby excluding standards > compliant compilers. >=20 > i would like to hear from the tech board that it is the best trade-off fo= r the > project to reduce compiler portability for older versions of gcc instead = of > adopting standard C11 atomics which locks out the use of other compilers. >=20 > if this change does go forward could i at least ask that the builtins use= d are > abstracted behind either macros or inline functions so that if alternate > implementations appear for the builtins we don't have to perform shotgun > surgery on the broader codebase when it arrives? There is already code using the built-ins in the repo. I do not see why thi= s is any different. How difficult it is for the compiler to support these built-ins? If DPDK supports another compiler in the future that do not have these buil= t-ins, the shotgun approach should be straight forward as there is a 1:1 ma= pping between the built-ins and the C11 atomic APIs from stdatomic.h. >=20 > thanks!