From: Zbigniew Bodek Date: Wed, 18 Jan 2017 20:01:57 +0000 (+0100) Subject: cryptodev: introduce ARM-specific feature flags X-Git-Tag: spdx-start~4691 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c2fec022454375e273094918c94dda1bddd863c7;p=dpdk.git cryptodev: introduce ARM-specific feature flags Add two new feature flags: * RTE_CRYPTODEV_FF_CPU_NEON represents ARM NEON (TM) instructions * RTE_CRYPTODEV_FF_CPU_ARM_CE represents ARM crypto extensions Add them to both cryptodev library, documentation and relevant PMD driver for ARMv8. Signed-off-by: Zbigniew Bodek --- diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst index bd5f0ad9f5..9ec32f15d0 100644 --- a/doc/guides/cryptodevs/overview.rst +++ b/doc/guides/cryptodevs/overview.rst @@ -45,6 +45,8 @@ Supported Feature Flags "RTE_CRYPTODEV_FF_CPU_AVX512",,,x,,,, "RTE_CRYPTODEV_FF_CPU_AESNI",,,x,x,,, "RTE_CRYPTODEV_FF_HW_ACCELERATED",x,,,,,, + "RTE_CRYPTODEV_FF_CPU_NEON",,,,,,, + "RTE_CRYPTODEV_FF_CPU_ARM_CE",,,,,,, Supported Cipher Algorithms diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c index 1bf0f9d8cf..d2b88a3e89 100644 --- a/drivers/crypto/armv8/rte_armv8_pmd.c +++ b/drivers/crypto/armv8/rte_armv8_pmd.c @@ -826,7 +826,9 @@ cryptodev_armv8_crypto_create(struct rte_crypto_vdev_init_params *init_params) dev->enqueue_burst = armv8_crypto_pmd_enqueue_burst; dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | - RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING; + RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_CPU_NEON | + RTE_CRYPTODEV_FF_CPU_ARM_CE; /* Set vector instructions mode supported */ internals = dev->data->dev_private; diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index f2ceb9bdf5..6a51eec44d 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -240,6 +240,10 @@ rte_cryptodev_get_feature_name(uint64_t flag) return "HW_ACCELERATED"; case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER: return "MBUF_SCATTER_GATHER"; + case RTE_CRYPTODEV_FF_CPU_NEON: + return "CPU_NEON"; + case RTE_CRYPTODEV_FF_CPU_ARM_CE: + return "CPU_ARM_CE"; default: return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 452b174949..f284668d3f 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -232,6 +232,11 @@ struct rte_cryptodev_capabilities { /**< Utilises CPU SIMD AVX512 instructions */ #define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9) /**< Scatter-gather mbufs are supported */ +#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10) +/**< Utilises CPU NEON instructions */ +#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11) +/**< Utilises ARM CPU Cryptographic Extensions */ + /**