From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: spinlock: Move constructor function out of header file Date: Fri, 15 Jul 2016 16:37:54 +0200 Message-ID: <3850930.xJZUcGIqBK@xps13> References: <20160714132729.27024-1-damarion@cisco.com> <20160714200336.119bcfce@jvn> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson , Konstantin Ananyev , David Marchand To: Jan Viktorin , damarion@cisco.com Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 4DEB011D4 for ; Fri, 15 Jul 2016 16:37:56 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id i5so32804059wmg.0 for ; Fri, 15 Jul 2016 07:37:56 -0700 (PDT) In-Reply-To: <20160714200336.119bcfce@jvn> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I will apply it with trivial changes suggested by Jan and the small needed changes that I describe below: 2016-07-14 20:03, Jan Viktorin: > On Thu, 14 Jul 2016 15:27:29 +0200 > damarion@cisco.com wrote: > > --- /dev/null > > +++ b/lib/librte_eal/common/arch/x86/rte_spinlock.c [...] > > +uint8_t rte_rtm_supported; /* cache the flag to avoid the overhead > > + of the rte_cpu_get_flag_enabled function */ This variable must be exported in the .map file. > > --- a/lib/librte_eal/linuxapp/eal/Makefile > > +++ b/lib/librte_eal/linuxapp/eal/Makefile > > @@ -106,6 +106,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_keepalive.c > > > > # from arch dir > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_cpuflags.c > > +SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_spinlock.c > > This is not good, you provide rte_spinlock.c only for x86. Building > for any other arch would fail to find this file. This change do the trick: -SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_spinlock.c +SRCS-$(CONFIG_RTE_ARCH_X86) += rte_spinlock.c (Note that CONFIG_RTE_EXEC_ENV_LINUXAPP check is not needed inside linuxapp EAL) > Moreover, the bsdapp/eal/Makefile should reflect this situation as > well. Yes