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 95DEDA0548; Thu, 16 Jul 2020 23:46:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0D1A4F9A; Thu, 16 Jul 2020 23:46:03 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 3577F4C7B for ; Thu, 16 Jul 2020 23:46:02 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id m22so5515380pgv.9 for ; Thu, 16 Jul 2020 14:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3DNXfj9lGeYpjSG4WQR4Erfe1m4bHD4+RjHVZwUpUE4=; b=Hv86yH+L8ZkbrthSQk7KLeL63CV66x47CApud+0j/QRqdWPhopbQI5tQwKYFEUTCwb B6dRB2eQlc8MInyTaqUYq3YxV3/uTvhRHo+JFAZAT/jpJb0uwEEvTShAA2agKoZnkVxb CMPtSZdF9WJmbwZS7uCFjJBXgJ9c1XzsPZn+PJhXqCa+lzCfeUxnIN+Qh3CfPEsCpLxz fRuWzqeYvHlA+tDqydeQfLsLEE6qqaqVrNWOl837RbbCOpF7NqMCYhllI6Goy5BQFbj5 UoYbHT3sJhXDeGCXYzK7tcxVy8asyJr3khib0Nqkje6B5VTYDDSOqSnyadmMQ7XYkbG8 Hg5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3DNXfj9lGeYpjSG4WQR4Erfe1m4bHD4+RjHVZwUpUE4=; b=SpUwu8Pr97yz8LXQrcxXAvissx2TrnsS7lELlSwIG3U/PczsQnjAcOGRm9F0w1ZbjL 3MsaJzCLotfCfVKAgF9F3dVyxkyTbxiKHGC887P3+S6JTrhlnkmC8rZF7drjCzH/8FtS m73qdNolhznJUOgWu3mMbO8eyfddxNQwoCTroGAK7Y+UDnJJm5UrLCnPjW9VFSovjlqP T7zJ92Yx8Q462gNA/T2LPY5j1UM6j3hWuzOHdsoOsNi6UTtN4Kchh+SzvvYfY6Ea/cqB OO58lg3NK+z00xZr1yXvnScHio/HQDbCw3ZmKS+Per363yfg+f2UalLEMtZuxhOC/tRt NmDA== X-Gm-Message-State: AOAM531fAgO9zZemWbKT/o0sRqwew/RjNNpPac9fWO/qoQ3GfpO7GjuY eunaeeA5OMdAu0qewmq/3CGrfs/Bya/fog== X-Google-Smtp-Source: ABdhPJxjHrnVDgWQYJh8mH4pNK6/m2xjxtg5QeALeTonbO5yNoYo925gMXKDjxq+3pjKCiZdq266Bg== X-Received: by 2002:aa7:9eca:: with SMTP id r10mr5272354pfq.301.1594935961209; Thu, 16 Jul 2020 14:46:01 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id m140sm5540785pfd.195.2020.07.16.14.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 14:46:00 -0700 (PDT) Date: Thu, 16 Jul 2020 14:45:52 -0700 From: Stephen Hemminger To: Honnappa Nagarahalli 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 Message-ID: <20200716144552.12d384c7@hermes.lan> In-Reply-To: References: <1594621423-14796-1-git-send-email-phil.yang@arm.com> <3325015.uBoaBXitGU@thomas> <4777511.sDcrFEcvGN@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Thu, 16 Jul 2020 16:59:11 +0000 Honnappa Nagarahalli wrote: > > > > > > > > > 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=0 > > > > > > + c11_atomics_dir="lib/librte_distributor lib/librte_hash > > lib/librte_kni > > > > > > + lib/librte_lpm lib/librte_rcu lib/librte_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-event" > > > > > > > > > > I prefer a form like: > > > > > > > > > > + c11_atomics_dir="" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/event/octeontx" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/event/octeontx2" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/event/opdl" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/bnx2x" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/hinic" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/hns3" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/memif" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/thunderx" > > > > > + c11_atomics_dir="$c11_atomics_dir drivers/net/virtio" > > > > > + c11_atomics_dir="$c11_atomics_dir examples/l2fwd-event" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_distributor" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_hash" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_kni" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_lpm" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_rcu" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_ring" > > > > > + c11_atomics_dir="$c11_atomics_dir lib/librte_stack" > > > > > + c11_atomics_dir="$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. > > > > > Can't the conversion just be automated with something coccinelle?