From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB71BA0528; Sat, 18 Jul 2020 00:48:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E61011BF76; Sat, 18 Jul 2020 00:48:13 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150083.outbound.protection.outlook.com [40.107.15.83]) by dpdk.org (Postfix) with ESMTP id 23AE81BF6C for ; Sat, 18 Jul 2020 00:48:13 +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=YpfDklM6VVDNfhgmVNjAOUxNp86np9DNwgyxkaLkTf4=; b=iL9pMn9rh1xdJrK7iJ6YebfuukN17aYNuUR7r9YDqHM3Gety8vEl3oFLnN0/iqJ9+dRLV1LBi42Wrm49Qn8MEN31u0/P/Mg75bp2olfuFFvXWgdgbRRqwwhhiTGGLmBGATCsSWccTUaTH/aZ/m/2EStFjVb8DkHGlN1boHe+tBU= Received: from DB6PR1001CA0028.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::14) by AM0PR08MB4930.eurprd08.prod.outlook.com (2603:10a6:208:157::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Fri, 17 Jul 2020 22:48:11 +0000 Received: from DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::90) by DB6PR1001CA0028.outlook.office365.com (2603:10a6:4:55::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Fri, 17 Jul 2020 22:48:11 +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=bestguesspass 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 DB5EUR03FT063.mail.protection.outlook.com (10.152.20.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Fri, 17 Jul 2020 22:48:11 +0000 Received: ("Tessian outbound c4059ed8d7bf:v62"); Fri, 17 Jul 2020 22:48:11 +0000 X-CR-MTA-TID: 64aa7808 Received: from e829904f08e3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9793C3B5-8756-4B32-BB6C-71410E2D766E.1; Fri, 17 Jul 2020 22:48:06 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e829904f08e3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Jul 2020 22:48:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZbertgIMKDwOaoF+ljpyue3g+GaiD/uq++x+ffC/1L5t+BRqas9ZEpSmmp0+DgSATw6YZkNZ4h4Jy1GLje7E1YM/m24y0gcDPSI4nx0mtWwspcIr20NsKb/W1hTCUY/J7t8qiPYx4ZpwIjUB4VIqphnjifS19jUZg9y5F2ctMcUYLUsAudk62022fqbUuDLq6flcvA5nO9R9ZMdoaF6Hleg7TTC2ZAIDdPMTLu4NadXQneNk6kAarpuhdzz2qsZRZZ0m6Xh8zgfoFrzQkbopXblUcjIQLLMNwY6CEdeyWT1FIlBV5Sppmbg4v4ij6qkmFnaynQsPFx3Y5+cEzKdlgg== 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=YpfDklM6VVDNfhgmVNjAOUxNp86np9DNwgyxkaLkTf4=; b=HkjNnEoiyyUzgd/BbikEc6IVILa8Tv0im0zHPrW4prxAle+K5HbxyqIpijrYcBe8AFWHRPZ0JTTjQ3ESKBE4doIbiXAtjIzAQVs9TWjRkt7OsoRIkxCKjG3fswGCNdRmEalPGxZxqGVPVoJd/+Ocj9Cpz67uVWIyI5p5JOqHBufBlzx1yinQ7LTUAgJG6Xi2FvtMT1K1q0Xz+wvWUWdindy+V0Lrmug+amFp/tJL+u+nwpB6h1qAUIUQifEQlk25ybBdbBAbDWlBAfUHVadd4sbrEvAq79mKsPIa/woARwU3d1ba/eW8lgbTTM1+jxvm12g68Ch9v/K/jJDbWLVnmg== 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=YpfDklM6VVDNfhgmVNjAOUxNp86np9DNwgyxkaLkTf4=; b=iL9pMn9rh1xdJrK7iJ6YebfuukN17aYNuUR7r9YDqHM3Gety8vEl3oFLnN0/iqJ9+dRLV1LBi42Wrm49Qn8MEN31u0/P/Mg75bp2olfuFFvXWgdgbRRqwwhhiTGGLmBGATCsSWccTUaTH/aZ/m/2EStFjVb8DkHGlN1boHe+tBU= Received: from DB6PR0802MB2216.eurprd08.prod.outlook.com (2603:10a6:4:85::9) by DB7PR08MB3004.eurprd08.prod.outlook.com (2603:10a6:5:1c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Fri, 17 Jul 2020 22:48:05 +0000 Received: from DB6PR0802MB2216.eurprd08.prod.outlook.com ([fe80::9d1d:207b:e89d:199d]) by DB6PR0802MB2216.eurprd08.prod.outlook.com ([fe80::9d1d:207b:e89d:199d%10]) with mapi id 15.20.3174.027; Fri, 17 Jul 2020 22:48:05 +0000 From: Honnappa Nagarahalli To: Stephen Hemminger CC: "thomas@monjalon.net" , Phil Yang , "dev@dpdk.org" , "Mcnamara, John" , David Christensen , "jerinj@marvell.com" , "Ananyev, Konstantin" , Ola Liljedahl , Bruce Richardson , Ruifeng Wang , nd , David Marchand , Honnappa Nagarahalli , nd Thread-Topic: [dpdk-dev] [PATCH v8 2/3] devtools: prevent use of rte atomic APIs in future patches Thread-Index: AQHWW5JtKe65xTzx+UC12vJy3iIY0KkKvc4AgAGg4oA= Date: Fri, 17 Jul 2020 22:48:04 +0000 Message-ID: References: <1594621423-14796-1-git-send-email-phil.yang@arm.com> <3325015.uBoaBXitGU@thomas> <4777511.sDcrFEcvGN@thomas> <20200716144552.12d384c7@hermes.lan> In-Reply-To: <20200716144552.12d384c7@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: d4073576-8be1-43a6-ae5e-4381ac35f5ce.0 x-checkrecipientchecked: true Authentication-Results-Original: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7efc8851-e3b1-4e6d-57c7-08d82aa37b91 x-ms-traffictypediagnostic: DB7PR08MB3004:|AM0PR08MB4930: 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:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 9NVbnFq+FdCOUhnQ1p0YC+EAdWc7T1rjL63wSRrLVaeJzm6NBkb2g7AZCjbzr7BMX4q94ck4gXOHxApAIdrbXgmr8hhmFJTbLaQUftp6l+KXYjow/qghPnKrF54CB0X0T8cZ4aJ1C5e4WEwl1A169PcrvkXBB/RGG1IKbUjKhm1aDLhDTIhnHaIwJ/oHt/PgRWFp67gR00/z46IE28ATHxc+a2hY9JzHSU0VXaAIlaZufGXyUjoK+YtuTV1XLaXZ/5SeaYN69SXX+nNAF4ZjL4K8wCc3xLC10aU2f+29HvAYnBHRRC8/r70adz51gMp4 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0802MB2216.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(346002)(136003)(366004)(376002)(66476007)(6916009)(66946007)(66446008)(8936002)(26005)(64756008)(6506007)(83380400001)(66574015)(33656002)(76116006)(7696005)(86362001)(2906002)(478600001)(53546011)(8676002)(54906003)(55016002)(5660300002)(66556008)(4326008)(9686003)(186003)(71200400001)(316002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 9DCaqBzLil1jBJXX2+OECoOA59g/h8LHiudCPl2UCkAML5Ppru5/gFbzBG3WJgZb1toBaX8MzwYwQ//Es0cKxCgYPo/Gn2P1e+dPfp5tLmqm0HReIeEL7als+sWpj+pdOTp6+drxR/11ObcUNUJPkXQlY6geb+G7Mum9k0yUHKDR9VVOc+Ty6EB2BsHMqjr1ZxTEBbHbTdunKS4ovGXZOWQc6bJnLOr7ybJf6KXQVf1TGLqn9vjzaB80NqCsAOc9mFkIx44PGpWXeoKxt3vVm6h6Itskf7vFbCLLR5IWNC7irdARKBC6HBZSamDgI9lEzGurxpye0lhc2Wly+wbajqIO9nuYdNQTumTllLTnDMR7ZTYkJj/niG7pGPhY7aF13nFW92EgRKYTDjCU02THVOpEvr85hFI+TzsIh9OzT711vkR1gRONCaZNszVaF2eBAAwDdUcfCleiVbW1VKV8txQqpDtqIV1jp0AOkHXKAADwExs8tks3JIA2KZevTltO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3004 Original-Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com 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; SFTY:; SFS:(4636009)(136003)(39860400002)(346002)(396003)(376002)(46966005)(52536014)(82740400003)(4326008)(47076004)(5660300002)(7696005)(81166007)(356005)(2906002)(70586007)(70206006)(336012)(6862004)(26005)(86362001)(478600001)(186003)(9686003)(53546011)(8936002)(6506007)(55016002)(8676002)(82310400002)(54906003)(83380400001)(66574015)(316002)(33656002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: cc48f244-0699-4a17-1b5f-08d82aa377de X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iQ+gBjvQFvQY7//hlpefB/FDBBRnSiDPsQwZpf8jJpA25I9H6yV+h3cDQL9W6NR4Lf0sqZgjC9fdb6QwTZChSrlztVo/3+z63DhTGxIYR8L1+VEqSYr51PHGEFr1nGSPJh9MSwxV5RTBnnsKKoLoYKWgP7L7jITmV6mwJebSZOaSNUNeDqTAjxcajlZxInMfN+V+2KBKzti4P8etderasEM+ZVJ5BbjK4kRSbm5oGyojW8nWwaPziQB4HvLizSxn3fX4gPn9rvT5JmBn7gQpKOHhJDZQCFaM60zyMVkALpzudkCSy5ch1uNFWxxns246S+JEKeZr1dmDoZGqI9pXyh7kjTLmDt1xgFTRI+Kq3fk36lV5DUrWIR6iBPibrW8Tv9SH6tc2+FrAEOYyB3t87g== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2020 22:48:11.4003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7efc8851-e3b1-4e6d-57c7-08d82aa37b91 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: DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4930 Subject: Re: [dpdk-dev] [PATCH v8 2/3] devtools: prevent use of rte atomic APIs in future patches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > > > > > > > > > > > Subject: Re: [dpdk-dev] [PATCH v8 2/3] devtools: prevent use of > > > > > rte atomic APIs in future patches > > > > > > > > > > 16/07/2020 12:48, David Marchand: > > > > > > On Thu, Jul 16, 2020 at 6:58 AM Phil Yang > wrote: > > > > > > > check_forbidden_additions() { # > > > > > > > res=3D0 > > > > > > > + c11_atomics_dir=3D"lib/librte_distributor > > > > > > > + lib/librte_hash > > > lib/librte_kni > > > > > > > + lib/librte_lpm lib/librte_rcu lib/li= brte_ring > > > > > > > + lib/librte_stack lib/librte_vhost > > > > > > > + drivers/event/octeontx drivers/event= /octeontx2 > > > > > > > + drivers/event/opdl drivers/net/bnx2x > drivers/net/hinic > > > > > > > + drivers/net/hns3 drivers/net/memif > > > drivers/net/thunderx > > > > > > > + drivers/net/virtio examples/l2fwd-ev= ent" > > > > > > > > > > > > I prefer a form like: > > > > > > > > > > > > + c11_atomics_dir=3D"" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/event/octeontx= " > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/event/octeontx= 2" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/event/opdl" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/bnx2x" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/hinic" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/hns3" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/memif" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/thunderx" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir drivers/net/virtio" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir examples/l2fwd-event" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_distributor= " > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_hash" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_kni" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_lpm" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_rcu" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_ring" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_stack" > > > > > > + c11_atomics_dir=3D"$c11_atomics_dir lib/librte_vhost" > > > > > > > > > > > > Easier to read and update. > > > > > > > > > > Why do we need this list at all? > > > > > Are we allowed to add new code with old atomics in other > > > > > directories? > > > > > How bad it is to have a warning on non-converted libs? > > > > > > > > From my perspective, the pros of this list are : > > > > 1. Avoid introducing false warnings in non-converted modules. > > > > Otherwise, > > > the maintainers have to wonder if that module is converted or not. > > > > > > Don't we want to convert all libs? > > The goal is to convert all the libs. > > > > > If we are adding one more rte_atomic in a lib, we should ask the > > > question why not converting to C11, no? > > Agree, I am fine with this approach. That will kind of distribute the > conversion work as well. > > > > > > > > > 2. Keep non-converted modules compatible. C11 atomic builtins > > > > cannot be > > > used directly for rte_atomicXX_t variables. > > > > > > > > The cons are : > > > > 1. The list needs updating every time we convert a module. > > This list will go away once all the modules are converted. > > > > > > 2. The script is not elegant as before. > > > > > > > > >=20 > Can't the conversion just be automated with something coccinelle? I do not know what 'coccinelle' means, not much help on the internet as wel= l. I really have not thought about automation. But, working on these conversio= ns, I have realized that understanding of the synchronizations used is requ= ired (basically, understanding the entire module) to ensure the correct bar= riers are used. We could use the most strongest barrier and functionality w= ould be fine, but the performance would take a hit.