From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 8610D5A06 for ; Tue, 3 Mar 2015 22:04:19 +0100 (CET) Received: by wivz2 with SMTP id z2so6635578wiv.0 for ; Tue, 03 Mar 2015 13:04:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=CR2iQ4p+NRVK/6GWbIgAQichS86A3nq/Gf7QAnkx1QU=; b=cOLfY65b/PQVFLnbWAldEDu/fWeIaaF5kt/txpfvgI9Qv/09LjpuCu/SJ585b9jm8q qLrsGdQMTGfjoFTjdemQE/+ids7HjqtRXGudv9WlIQwT4vQtyUgW0tPGIwVvKmF5ieSI YzzqGhzGdsNfsJCDKjYA00ANSZiBE/3TuzK+uaEd+pw4eFa/uBlTv1FJW/6+rgwlDxaC JuRIU4Piringk8L+iO/Ki7j2OVAU6s6wnd83qLm4LOflVNU1Lcuc/ifr0A7DXyoxPe9O A9yShV6GR0IuLmeTdHUl1zCIh4KYI7uBNaP8jv554dtY3Q55KEULMBk6ZdFCYHZ2edvN BB5w== X-Gm-Message-State: ALoCoQkMxCCurjpIwQsptmb0URGlUn5/lIngtHHIMtnpdulKC9jfn59FdohwHnBX26EBRYWhew7A X-Received: by 10.194.235.71 with SMTP id uk7mr1396059wjc.13.1425416659278; Tue, 03 Mar 2015 13:04:19 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id g5sm2952282wjr.19.2015.03.03.13.04.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2015 13:04:18 -0800 (PST) From: Thomas Monjalon To: Bruce Richardson Date: Tue, 03 Mar 2015 22:03:45 +0100 Message-ID: <6979759.vFaJhNqs1F@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1425400717-24322-1-git-send-email-bruce.richardson@intel.com> References: <1425400717-24322-1-git-send-email-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] ring: cleanup file-local macros at end-of-file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 21:04:19 -0000 2015-03-03 16:38, Bruce Richardson: > The ENQUEUE_PTRS and DEQUEUE_PTRS macros defined in rte_ring.h are > not meant to be global and are not prefixed with the RTE_ prefix. > Therefore undef the macros at end of file to avoid pollution of the > global namespace, in case ends apps end up wanting to reuse those names. > > Signed-off-by: Bruce Richardson > --- > lib/librte_ring/rte_ring.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h > index bdf69b7..0d35648 100644 > --- a/lib/librte_ring/rte_ring.h > +++ b/lib/librte_ring/rte_ring.h > @@ -1232,6 +1232,10 @@ rte_ring_dequeue_burst(struct rte_ring *r, void **obj_table, unsigned n) > return rte_ring_mc_dequeue_burst(r, obj_table, n); > } > > +/* undef un-prefixed macros which are local to this file */ > +#undef ENQUEUE_PTRS > +#undef DEQUEUE_PTRS > + Thanks for trying to clean-up things. Note that if an application is using this macro name, it will be destroyed when including rte_ring.h. Globally, DPDK namespace is awful and I hope we will be able to improve it.