From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v1 02/14] ring: create common structure for prod and cons metadata Date: Wed, 1 Mar 2017 11:22:43 +0100 Message-ID: <20170301112243.6f91e0cb@platinum> References: <20170223172407.27664-1-bruce.richardson@intel.com> <20170223172407.27664-3-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Bruce Richardson 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) In-Reply-To: <20170223172407.27664-3-bruce.richardson@intel.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 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