From: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
To: cristian.dumitrescu@intel.com, thomas@monjalon.net,
jasvinder.singh@intel.com, viktorin@rehivetech.com,
jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org
Cc: dev@dpdk.org, Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v3 1/4] mk: add crypto capability for generic armv8a and thunderx
Date: Wed, 3 May 2017 23:56:59 -0700 [thread overview]
Message-ID: <20170504065702.22404-1-ashwin.sekhar@caviumnetworks.com> (raw)
In-Reply-To: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com>
armv8-a has optional CRYPTO extension which adds the
AES, PMULL, SHA1 and SHA2 capabilities. -march=armv8-a+crypto
enables code generation for the ARMv8-A architecture together
with the optional CRYPTO extensions.
added the following flags to detect the corresponding
capability at compile time
* RTE_MACHINE_CPUFLAG_AES
* RTE_MACHINE_CPUFLAG_PMULL
* RTE_MACHINE_CPUFLAG_SHA1
* RTE_MACHINE_CPUFLAG_SHA2
at run-time, the following flags can be used to detect these
capabilities
* RTE_CPUFLAG_AES
* RTE_CPUFLAG_PMULL
* RTE_CPUFLAG_SHA1
* RTE_CPUFLAG_SHA2
Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
---
v3:
* Moved the feature detection changes into separate commit
* Added the AES, SHA1, SHA2 capabilities also under the CRYPTO flag
along with PMULL
mk/machine/armv8a/rte.vars.mk | 2 +-
mk/machine/thunderx/rte.vars.mk | 2 +-
mk/rte.cpuflags.mk | 6 ++++++
mk/toolchain/gcc/rte.toolchain-compat.mk | 1 +
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/mk/machine/armv8a/rte.vars.mk b/mk/machine/armv8a/rte.vars.mk
index d5049e1..51966a5 100644
--- a/mk/machine/armv8a/rte.vars.mk
+++ b/mk/machine/armv8a/rte.vars.mk
@@ -55,4 +55,4 @@
# CPU_LDFLAGS =
# CPU_ASFLAGS =
-MACHINE_CFLAGS += -march=armv8-a+crc
+MACHINE_CFLAGS += -march=armv8-a+crc+crypto
diff --git a/mk/machine/thunderx/rte.vars.mk b/mk/machine/thunderx/rte.vars.mk
index ad5a379..6784105 100644
--- a/mk/machine/thunderx/rte.vars.mk
+++ b/mk/machine/thunderx/rte.vars.mk
@@ -55,4 +55,4 @@
# CPU_LDFLAGS =
# CPU_ASFLAGS =
-MACHINE_CFLAGS += -march=armv8-a+crc -mcpu=thunderx
+MACHINE_CFLAGS += -march=armv8-a+crc+crypto -mcpu=thunderx
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 4288c14..a813c91 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -125,6 +125,12 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_FEATURE_CRC32),)
CPUFLAGS += CRC32
endif
+ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_FEATURE_CRYPTO),)
+CPUFLAGS += AES
+CPUFLAGS += PMULL
+CPUFLAGS += SHA1
+CPUFLAGS += SHA2
+endif
MACHINE_CFLAGS += $(addprefix -DRTE_MACHINE_CPUFLAG_,$(CPUFLAGS))
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 280dde2..01ac7e2 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -60,6 +60,7 @@ else
#
ifeq ($(shell test $(GCC_VERSION) -le 49 && echo 1), 1)
MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc,-march=armv8-a+crc -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS))
+ MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc+crypto,-march=armv8-a+crc+crypto -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS))
endif
ifeq ($(shell test $(GCC_VERSION) -le 47 && echo 1), 1)
MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS))
--
2.7.4
next prev parent reply other threads:[~2017-05-04 6:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 14:06 [dpdk-dev] [PATCH 1/2] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-04 6:56 ` Ashwin Sekhar T K [this message]
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-05-04 15:22 ` Jan Viktorin
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-05-04 15:20 ` [dpdk-dev] [PATCH v3 1/4] mk: add crypto capability for generic armv8a and thunderx Jan Viktorin
2017-05-04 22:10 ` Thomas Monjalon
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 " Ashwin Sekhar T K
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-12 5:51 ` Jianbo Liu
2017-05-12 7:25 ` Sekhar, Ashwin
2017-05-12 8:49 ` Jianbo Liu
2017-05-12 8:56 ` Sekhar, Ashwin
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 0/4] add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 1/4] mk: add crypto capability for generic armv8a and thunderx Ashwin Sekhar T K
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-05-15 2:07 ` Jianbo Liu
2017-07-03 20:51 ` Thomas Monjalon
2017-07-04 8:48 ` Sekhar, Ashwin
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-15 2:32 ` Jianbo Liu
2017-07-03 21:06 ` Thomas Monjalon
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 0/4] add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 1/4] mk: add crypto capability for generic armv8a and thunderx Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-07-04 13:53 ` Thomas Monjalon
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-07-04 13:55 ` [dpdk-dev] [PATCH v6 0/4] add arm64 neon version of CRC compute APIs Thomas Monjalon
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=20170504065702.22404-1-ashwin.sekhar@caviumnetworks.com \
--to=ashwin.sekhar@caviumnetworks.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jianbo.liu@linaro.org \
--cc=thomas@monjalon.net \
--cc=viktorin@rehivetech.com \
/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).