DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 5/7] efd: add new avx2 standalone file to build
Date: Tue, 17 Oct 2017 11:41:11 +0100	[thread overview]
Message-ID: <20171017104113.175250-6-bruce.richardson@intel.com> (raw)
In-Reply-To: <20171017104113.175250-1-bruce.richardson@intel.com>

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_efd/meson.build | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lib/librte_efd/meson.build b/lib/librte_efd/meson.build
index 73c004e70..01e7a22db 100644
--- a/lib/librte_efd/meson.build
+++ b/lib/librte_efd/meson.build
@@ -32,3 +32,22 @@
 sources = files('rte_efd.c')
 headers = files('rte_efd.h')
 deps += ['ring', 'hash']
+
+if arch_subdir == 'x86'
+	# 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('rte_efd_x86.c')
+	elif cc.has_argument('-mavx2')
+		avx2_tmplib = static_library('avx2_efd_tmp',
+				'rte_efd_x86.c',
+				dependencies: rte_eal,
+				c_args: '-mavx2')
+		objs += avx2_tmplib.extract_objects('rte_efd_x86.c')
+	endif
+endif
-- 
2.13.6

  parent reply	other threads:[~2017-10-17 11:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 10:41 [dpdk-dev] [PATCH 0/7] update dpdk-next-build to 17.11-rc1 Bruce Richardson
2017-10-17 10:41 ` [dpdk-dev] [PATCH 1/7] build: add rte_bitmap.h to eal Bruce Richardson
2017-10-17 10:41 ` [dpdk-dev] [PATCH 2/7] build: remove rte_bitmap.h from rte_sched lib Bruce Richardson
2017-10-17 10:41 ` [dpdk-dev] [PATCH 3/7] build: add gso library Bruce Richardson
2017-10-17 10:41 ` [dpdk-dev] [PATCH 4/7] eal/x86: add additional memcpy and cycles C files to build Bruce Richardson
2017-10-17 10:41 ` Bruce Richardson [this message]
2017-10-17 10:41 ` [dpdk-dev] [PATCH 6/7] app/test-pmd: add dependency on new gso library Bruce Richardson
2017-10-17 10:41 ` [dpdk-dev] [PATCH 7/7] eal/x86: compile memcpy for dynamic dispatch Bruce Richardson
2017-10-17 11:58 ` [dpdk-dev] [PATCH 0/7] update dpdk-next-build to 17.11-rc1 Luca Boccassi
2017-10-17 13:11   ` Bruce Richardson
2017-10-17 13:14     ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171017104113.175250-6-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).