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 56995A0567; Wed, 10 Mar 2021 16:10:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C173240F35; Wed, 10 Mar 2021 16:10:55 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id D60534069F for ; Wed, 10 Mar 2021 16:10:53 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id q204so12150371pfq.10 for ; Wed, 10 Mar 2021 07:10:53 -0800 (PST) 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=qHGCWQ0e5CxjnINzlllc/NjUVJXvkMqePvQeJZEVn/0=; b=bzH7f9kJ5q6T2t7+FuPU5E/auiaBXUd+NbAWTChPD3x7+Aphh1voFSx5MDNNIYMFnX 3bw+g9Xj3ujaPetDLYXSM12Q05HhSdYgY+irPFGXq0MYHnRNCQMxNQmuMcSMGraZGJ5H QKuD7UP4cC9PdTEnP4/WgY9NBTyZ+VEOMFK+UXBKTgPl7t3apB1PH1dnwtIJ/uUlaRn4 0t4xwHnoVQgg8dQEP87zgLRySGmDqcigQdhiI464HphGy2IQNYMDyTfdCwiOrwG3o+SK 5BSh0/eWKw1SZ+zSFGYjNyzyxvKj1lZu2AD0WefY/7tG1R0l6KomyRYj/MwLangyUSmF ogfg== 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=qHGCWQ0e5CxjnINzlllc/NjUVJXvkMqePvQeJZEVn/0=; b=SMYF7Kxavq6Ggk5aJIZ6xpafRndc87+iJsoKWCK/fWRWKLCTdVayE/y5oobD+JmIgq l5u0AcMGFJ5TwsEquBIk71ovicrjxbuTH5CRI2/a3IWpIGizhqV3May/Wk9bKEXhVK21 tvQUTZtBlBcFO+G5LK8rYN5mEbkCCTVPcfLTLy5IN7iGJ3rH/kfTx8UFP9RZez8Hvs51 oePIMfawrZRZgeyjtyqR7dVYC1l6ywk6gpW8ekEOE++VKCYICIxyIYPJFo4gxonHV38N GLYi4MryZOUOQ7riHlcREQpmdgtMTHQ9LWxfXyed7BPklENsM9BUuaIqM8X9iuK8M3MX LyyQ== X-Gm-Message-State: AOAM530Pwdkrk0f920rg7wfRMScOoja+gDQz6Myx+dRUnELnbig4CLM3 gW/N6KKN4YwneQv3XPqw/+JRDA== X-Google-Smtp-Source: ABdhPJyE7OJdK0qWSXLXzmzSvUSsYuWzpOwfisnKi2HlfG7U28Cw3d/9JAqRkvuDx8ncDnK3Nv3NOw== X-Received: by 2002:aa7:9096:0:b029:1f7:c442:fe37 with SMTP id i22-20020aa790960000b02901f7c442fe37mr3205194pfa.11.1615389052802; Wed, 10 Mar 2021 07:10:52 -0800 (PST) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id q25sm8385831pfh.34.2021.03.10.07.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 07:10:52 -0800 (PST) Date: Wed, 10 Mar 2021 07:10:49 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: Dharmik Thakkar , dev@dpdk.org, nd@arm.com, ruifeng.wang@arm.com, david.marchand@redhat.com Message-ID: <20210310071017.157a4105@hermes.local> In-Reply-To: <62130884.hdUCYtv3VG@thomas> References: <20210310110451.10885-1-dharmik.thakkar@arm.com> <62130884.hdUCYtv3VG@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] checkpatch: enable volatile warning 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" On Wed, 10 Mar 2021 12:10:01 +0100 Thomas Monjalon wrote: > 10/03/2021 12:04, Dharmik Thakkar: > > Enable volatile considered harmful warning since use of volatile > > is suspect. > > > > Suggested-by: Stephen Hemminger > > Signed-off-by: Dharmik Thakkar > > Reviewed-by: Ruifeng Wang > > git grep -w volatile | wc -l > 1796 > > How much is it suspect? > > Many seem to be unsafe. testpmd: uses flags values in unsafe manner it also uses volatile when accessing hardware registers test-alarm is expecting that alarm() is a signal (it is not) test-atomic is ok test-barrier is doing barriers and not using __atomic drivers use volatile to mark hardware registers. It is still true volatile is not enough are not weak memory model.