From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C71677CF8 for ; Mon, 4 Sep 2017 16:55:59 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 04 Sep 2017 07:55:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,475,1498546800"; d="scan'208";a="131559812" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.24]) by orsmga002.jf.intel.com with SMTP; 04 Sep 2017 07:55:57 -0700 Received: by (sSMTP sendmail emulation); Mon, 04 Sep 2017 15:55:56 +0100 Date: Mon, 4 Sep 2017 15:55:56 +0100 From: Bruce Richardson To: "Van Haaren, Harry" Cc: "dev@dpdk.org" Message-ID: <20170904145556.GJ11856@bricha3-MOBL3.ger.corp.intel.com> References: <20170901100416.80264-1-bruce.richardson@intel.com> <20170901100416.80264-5-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH 04/17] build: add DPDK libraries to build 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: Mon, 04 Sep 2017 14:56:00 -0000 On Mon, Sep 04, 2017 at 03:08:50PM +0100, Van Haaren, Harry wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Friday, September 1, 2017 11:04 AM > > To: dev@dpdk.org > > Cc: Richardson, Bruce > > Subject: [dpdk-dev] [PATCH 04/17] build: add DPDK libraries to build > > > > Add non-EAL libraries to DPDK build. The compat lib is a special case, > > along with the previously-added EAL, but all other libs can be build using > > the same set of commands, where the individual meson.build files only need > > to specify their dependencies, source files, header files and ABI versions. > > > > Signed-off-by: Bruce Richardson > > > > In librte_acl/meson.build: > > > +version = 2 > > +sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c', > > + 'rte_acl.c', 'tb_mem.c') > > +headers = files('rte_acl.h', 'rte_acl_osdep.h') > > + > > +if arch_subdir == 'x86' > > + sources += files('acl_run_sse.c') > > + > > + # compile AVX2 version if either: > > + # a. we have AVX supported in minimum instruction set baseline > > + # b. it's not minimum instruction set, but supported by compiler > > + # > > + # in former case, just add avx2 C file to files list > > + # in latter case, compile c file to static lib, using correct compiler > > + # flags, and then have the .o file from static lib linked into main lib. > > + if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2') > > + sources += files('acl_run_avx2.c') > > + cflags += '-DCC_AVX2_SUPPORT' > > + elif cc.has_argument('-mavx2') > > + avx2_tmplib = static_library('avx2_tmp', > > + 'acl_run_avx2.c', > > + dependencies: rte_eal, > > + c_args: '-mavx2') > > + objs += avx2_tmplib.extract_objects('acl_run_avx2.c') > > + cflags += '-DCC_AVX2_SUPPORT' > > + endif > > + > > +endif > > In future this could be split out to some sort of AVX helper, to avoid it > becoming copy/paste prone to detect AVX features from libraries. > We can indeed look at that in future, using native meson support I hope, from the SIMD module: http://mesonbuild.com/Simd-module.html Right now, though, I think this is the only place we need this, so it's not an issue. /Bruce