cryptodev: introduce ARM-specific feature flags
authorZbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Wed, 18 Jan 2017 20:01:57 +0000 (21:01 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 19 Jan 2017 00:00:55 +0000 (01:00 +0100)
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 <zbigniew.bodek@caviumnetworks.com>
doc/guides/cryptodevs/overview.rst
drivers/crypto/armv8/rte_armv8_pmd.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h

index bd5f0ad..9ec32f1 100644 (file)
@@ -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
 
index 1bf0f9d..d2b88a3 100644 (file)
@@ -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;
index f2ceb9b..6a51eec 100644 (file)
@@ -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;
        }
index 452b174..f284668 100644 (file)
@@ -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 */
+
 
 
 /**