From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id C9AD92BDF for ; Wed, 1 Mar 2017 11:22:46 +0100 (CET) Received: by mail-wr0-f176.google.com with SMTP id l37so26760568wrc.1 for ; Wed, 01 Mar 2017 02:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mwVNLTYBLKnOMqgUYPWniPWrWMbJMmf0Pr75EptffgY=; b=scvRSzzccPTiCVha4KM0UvvIE5MIjcgSJLd7gdwOPfx/QBeZMMj5/eP+0An+q9u2Ds 21UZlouYKgYqz2itQaOxHfe0oxSB5yvdKW2zLYfCRzr0zqORvbm3JWiN/INYp0k0eYFX F/IMaTLHJhpG1v5PDbgcDuEQThHBvkjP2+LJWPrEZJX9UANqamPxsXw8ib5kzkTFDhES fBGWiYk3N80UXWpfq5E43r+aWxETo3Hjntowdp3cnMHIc1N9XigXU2/1mztL90GyUTLo cFWuSZ/xAtZxKEQDniJAX7Cwex1cjCP6B4avyyRpdmzqQCAYmmkSedHj1VuTG0ByNARZ jxWQ== 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=mwVNLTYBLKnOMqgUYPWniPWrWMbJMmf0Pr75EptffgY=; b=rgvQGGBLDV/eTXKRzUqpFfs4zOCcAMCxQLrShK8WjXAl0xHRr+cJM5/vVJqTa5RH7Q tFSrd/+9QqjGEh4rTcgHNssa+QISc/FWOVcClkOU5Ah1vEIeLNNyE7E1pYTVQCFDJj31 RRFTAmq0t1rB+NZTZR4bXNwA1w2+2qWAK8JXErsmodsxq4ioLOBfRVpHBTpFinOgRUmb VR0iraIH4bwfNRIJ85QRWd/whbVI99EJWlFBvjqyvGwjP14PMSLla/C1B/1vvrVFts+N b8M2PQOhOmBkQyHljO4fFuGJiBKQV40sFoyHTloJzb+GkhilVVGT0Xg/OzgOTFezM8kn U0nA== X-Gm-Message-State: AMke39l7/i4ybJAjjthYNkTtODbd5BsAKln1Wn5kt+/wISaTWYy1UfvWU/ekR+1glwSnOX9i X-Received: by 10.223.175.15 with SMTP id z15mr7359219wrc.84.1488363766381; Wed, 01 Mar 2017 02:22:46 -0800 (PST) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id w204sm6289911wmd.17.2017.03.01.02.22.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2017 02:22:46 -0800 (PST) Date: Wed, 1 Mar 2017 11:22:43 +0100 From: Olivier Matz To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20170301112243.6f91e0cb@platinum> In-Reply-To: <20170223172407.27664-3-bruce.richardson@intel.com> References: <20170223172407.27664-1-bruce.richardson@intel.com> <20170223172407.27664-3-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 02/14] ring: create common structure for prod and cons metadata 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, 01 Mar 2017 10:22:47 -0000 On Thu, 23 Feb 2017 17:23:55 +0000, Bruce Richardson wrote: > create a common structure to hold the metadata for the producer and > the consumer, since both need essentially the same information - the > head and tail values, the ring size and mask. > > Signed-off-by: Bruce Richardson > --- > lib/librte_ring/rte_ring.h | 32 ++++++++++++++++---------------- > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h > index 04fe667..0c8defd 100644 > --- a/lib/librte_ring/rte_ring.h > +++ b/lib/librte_ring/rte_ring.h > @@ -1,7 +1,7 @@ > /*- > * BSD LICENSE > * > - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. > + * Copyright(c) 2010-2017 Intel Corporation. All rights reserved. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or > without @@ -139,6 +139,19 @@ struct rte_ring_debug_stats { > > struct rte_memzone; /* forward declaration, so as not to require > memzone.h */ > +/* structure to hold a pair of head/tail values and other metadata */ > +struct rte_ring_ht_ptr { Just wondering if we can find a better name for this structure. I'm not sure '_ptr' is really relevant. What do you think of: rte_ring_endpoint rte_ring_ht rte_ring_headtail Olivier