From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C672A968 for ; Tue, 19 Sep 2017 10:56:23 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2017 01:56:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,417,1500966000"; d="scan'208";a="136948219" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.24]) by orsmga002.jf.intel.com with SMTP; 19 Sep 2017 01:56:20 -0700 Received: by (sSMTP sendmail emulation); Tue, 19 Sep 2017 09:56:19 +0100 Date: Tue, 19 Sep 2017 09:56:19 +0100 From: Bruce Richardson To: Vladimir Kuramshin Cc: tomasz.kantecki@intel.com, dev@dpdk.org Message-ID: <20170919085619.GA17536@bricha3-MOBL3.ger.corp.intel.com> References: <20170907114527.26649-1-v.kuramshin@samsung.com> <20170919081731.23970-1-v.kuramshin@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170919081731.23970-1-v.kuramshin@samsung.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH v3] examples/l2fwd-cat: fix build according to API changes 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: Tue, 19 Sep 2017 08:56:24 -0000 On Tue, Sep 19, 2017 at 11:17:31AM +0300, Vladimir Kuramshin wrote: > Current version is compatible with PQOS version 1.3 > but not compatible with higher versions. This change > makes l2fwd-cat example compatible with versions since 1.4 > > Signed-off-by: Vladimir Kuramshin > --- > examples/l2fwd-cat/Makefile | 5 +-- > examples/l2fwd-cat/cat.c | 85 +++++++++++++++++++++++++++++++++++++++------ > 2 files changed, 76 insertions(+), 14 deletions(-) > > diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile > index ae921ade6..a7fe6d68e 100644 > --- a/examples/l2fwd-cat/Makefile > +++ b/examples/l2fwd-cat/Makefile > @@ -40,9 +40,6 @@ endif > # Default target, can be overridden by command line or environment > RTE_TARGET ?= x86_64-native-linuxapp-gcc > > -# Location of PQoS library and includes, > -PQOS_LIBRARY_PATH = $(PQOS_INSTALL_PATH)/libpqos.a > - > include $(RTE_SDK)/mk/rte.vars.mk > > # binary name > @@ -65,6 +62,6 @@ CFLAGS += -I$(PQOS_INSTALL_PATH)/../include > CFLAGS_cat.o := -D_GNU_SOURCE > > LDLIBS += -L$(PQOS_INSTALL_PATH) > -LDLIBS += $(PQOS_LIBRARY_PATH) > +LDLIBS += -lpqos > > include $(RTE_SDK)/mk/rte.extapp.mk > diff --git a/examples/l2fwd-cat/cat.c b/examples/l2fwd-cat/cat.c > index 6133bf5bb..9330b2d26 100644 > --- a/examples/l2fwd-cat/cat.c > +++ b/examples/l2fwd-cat/cat.c > @@ -53,7 +53,11 @@ > static const struct pqos_cap *m_cap; > static const struct pqos_cpuinfo *m_cpu; > static const struct pqos_capability *m_cap_l3ca; > +#if PQOS_VERSION <= 10300 > static unsigned m_sockets[PQOS_MAX_SOCKETS]; > +#else > +static unsigned int *m_sockets; > +#endif Does this check work right? The version number in git right now seems to be just 10100, which would use the "old" path here, despite being latest code? https://github.com/01org/intel-cmt-cat/blob/master/lib/pqos.h I will try and follow up with the maintainers of the pqos files, and see how the version numbers in pqos.h are meant to work. Regards, /Bruce