From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=XuueJ3pll/bjZbm5vMOUchBEAblGP5NGto9wJLm+njU=; b=uDkXSZCROUsZPFd7YWADCXnYOwK7qAM/fj1elZSnvDwGnnQ/a5DGZVs+3T/adLpWp0 4YvumxgSYR/Snn+9RqrH1tczeEPNPfs0jpRAil+ugAGYMf0CZj540BX8ibXzS7kNwMCP KEqJPh6X5UVWTFGXO5zISSFiaydJWrCOrLqQ6htnXJLnPdPWKdTKODJHSfAuAgh/E4Av SMgco046ZWdF4dojOXbjTkCEnqZ6UsjmffH545n7PX/Obmuq8Gg8r3Um475VstJtsUEy z8+uAVEuqE2GHrUNgxU9uFrURoYUIyR4uMO6+jw2kr1ut/38x1eh0UA+bEM7AJN2gT44 6B7Q== 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=XuueJ3pll/bjZbm5vMOUchBEAblGP5NGto9wJLm+njU=; b=lK4/vbWE4uyHcMzC5KtDh2ABQRjrmKw0MzkCcPtqHpO8tBx2klN5eHoxIlVrOr97qq kkptpxLpwwYRdubE/IwVmowUxzYSnwoGr/fwY/TnzM+eFwTt2iaWMd8/YA3C1qYruQYh DhGckA+vw6JGU/I430hUvbPUGR4OerlDGz8+f69tb8ryjl8IUvDs0TFKz8SB4kNwD2FQ XRITVnpeeDDacuSBAIFa05MHLtGCbOUt0SJ7wkiXa0zoFtLz63tiy64FaePXKtO4lqlJ 7lnWrEpipWiqB+Mpl588qUuaFyVdJJqMJHt4eMiJriOJLMWXLfh6SFVOnRGoQ7hOeWCG MCWw== X-Gm-Message-State: AGRZ1gIhkQ+lTPcoO07Pk0d3wAfem1gORlL/uxhm4Utw1ORvfCYNZFil PcsFZtdgoY8PyjeJY1kbz3Yd3A== X-Google-Smtp-Source: AJdET5dLRMdVijB4FSmq9PRYeZOEYaiQ6ZgEn/nQVWt12Pkn7wCbpdXxRCxiCP8JZ1QzAx5SoE5EpA== X-Received: by 2002:a63:e841:: with SMTP id a1-v6mr2046926pgk.4.1541023678686; Wed, 31 Oct 2018 15:07:58 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id f2-v6sm4157252pga.50.2018.10.31.15.07.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 15:07:58 -0700 (PDT) Date: Wed, 31 Oct 2018 15:07:50 -0700 From: Stephen Hemminger To: Gavin Hu 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 Message-ID: <20181031150750.62454627@xeon-e3> In-Reply-To: <1540981587-88590-2-git-send-email-gavin.hu@arm.com> 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 Subject: Re: [dpdk-dev] [PATCH v3 1/2] ring: synchronize the load and store of the tail 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: , X-List-Received-Date: Wed, 31 Oct 2018 22:08:00 -0000 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.