From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 1/2] ring: synchronize the load and store of the tail Date: Wed, 31 Oct 2018 15:07:50 -0700 Message-ID: <20181031150750.62454627@xeon-e3> References: <1540981587-88590-1-git-send-email-gavin.hu@arm.com> <1540981587-88590-2-git-send-email-gavin.hu@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, thomas@monjalon.net, olivier.matz@6wind.com, chaozhu@linux.vnet.ibm.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, Honnappa.Nagarahalli@arm.com, stable@dpdk.org To: Gavin Hu Return-path: Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id B975210A3 for ; Wed, 31 Oct 2018 23:07:59 +0100 (CET) Received: by mail-pg1-f195.google.com with SMTP id r9-v6so8024127pgv.6 for ; Wed, 31 Oct 2018 15:07:59 -0700 (PDT) In-Reply-To: <1540981587-88590-2-git-send-email-gavin.hu@arm.com> 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, 31 Oct 2018 18:26:26 +0800 Gavin Hu wrote: > - /* > - * The subtraction is done between two unsigned 32bits value > + /* load-acquire synchronize with store-release of ht->tail > + * in update_tail. > + */ > + const uint32_t cons_tail Please don't mix declarations and code. Although it is sometimes used in DPDK, in general the style is to have declarations at the start of the block scope.