cryptodev: support multiple cipher data-units
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.h
index ae34f33..7e80f4b 100644 (file)
@@ -95,6 +95,14 @@ struct rte_crypto_param_range {
         */
 };
 
+/**
+ * Data-unit supported lengths of cipher algorithms.
+ * A bit can represent any set of data-unit sizes
+ * (single size, multiple size, range, etc).
+ */
+#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_512_BYTES             RTE_BIT32(0)
+#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES            RTE_BIT32(1)
+
 /**
  * Symmetric Crypto Capability
  */
@@ -127,6 +135,12 @@ struct rte_cryptodev_symmetric_capability {
                        /**< cipher key size range */
                        struct rte_crypto_param_range iv_size;
                        /**< Initialisation vector data size range */
+                       uint32_t dataunit_set;
+                       /**<
+                        * Supported data-unit lengths:
+                        * RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_* bits
+                        * or 0 for lengths defined in the algorithm standard.
+                        */
                } cipher;
                /**< Symmetric Cipher transform capabilities */
                struct {
@@ -461,6 +475,8 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 /**< Support operations on data which is not byte aligned */
 #define RTE_CRYPTODEV_FF_SYM_RAW_DP                    (1ULL << 24)
 /**< Support accelerator specific symmetric raw data-path APIs */
+#define RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS    (1ULL << 25)
+/**< Support operations on multiple data-units message */
 
 /**
  * Get the name of a crypto device feature flag