cryptodev: remove AAD size in auth capabilities
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 11 Jul 2017 06:30:43 +0000 (07:30 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Jul 2017 11:10:41 +0000 (14:10 +0300)
Additional Authenticated Data (AAD) was removed from the
authentication parameters, but still the supported size
was part of the authentication capabilities of a PMD.

Fixes: 4428eda8bb75 ("cryptodev: remove AAD from authentication structure")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
14 files changed:
app/test-crypto-perf/main.c
doc/guides/rel_notes/release_17_08.rst
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
drivers/crypto/armv8/rte_armv8_pmd_ops.c
drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
drivers/crypto/null/null_crypto_pmd_ops.c
drivers/crypto/openssl/rte_openssl_pmd_ops.c
drivers/crypto/qat/qat_crypto_capabilities.h
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
drivers/crypto/zuc/rte_zuc_pmd_ops.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h

index 51345ea..99f5d3e 100644 (file)
@@ -208,7 +208,6 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,
                                        capability,
                                        opts->auth_key_sz,
                                        opts->digest_sz,
-                                       0,
                                        opts->auth_iv_sz);
                        if (ret != 0)
                                return ret;
index ef51ebb..6f3b662 100644 (file)
@@ -291,6 +291,8 @@ API Changes
     ``mempool``, instead of ``device id`` and ``rte_crypto_sym_xform``.
   * Remove ``device id`` parameter from ``rte_cryptodev_sym_session_free()``.
   * Added new field ``session_pool`` to ``rte_cryptodev_queue_pair_setup()``.
+  * Removed ``aad_size`` parameter from ``rte_cryptodev_sym_capability_check_auth()``.
+  * Added ``iv_size`` parameter to ``rte_cryptodev_sym_capability_check_auth()``.
 
 
 ABI Changes
index 6d24a32..af107a5 100644 (file)
@@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = {
                                        .max = 16,
                                        .increment = 4
                                },
-                               .aad_size = { 0 },
                                .iv_size = {
                                        .min = 12,
                                        .max = 12,
index e3a6ef5..d033408 100644 (file)
@@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 12,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 12,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 14,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 16,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 24,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 32,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                        .max = 12,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
index 05a7703..cc77d40 100644 (file)
@@ -59,7 +59,6 @@ static const struct rte_cryptodev_capabilities
                                                .max = 20,
                                                .increment = 0
                                        },
-                                       .aad_size = { 0 },
                                        .iv_size = { 0 }
                                }, }
                        }, }
@@ -81,7 +80,6 @@ static const struct rte_cryptodev_capabilities
                                                .max = 32,
                                                .increment = 0
                                        },
-                                       .aad_size = { 0 },
                                        .iv_size = { 0 }
                                }, }
                        }, }
index eafa0eb..e104f71 100644 (file)
@@ -209,7 +209,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                        .max = 16,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -231,7 +230,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                        .max = 20,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -253,7 +251,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                        .max = 28,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -275,7 +272,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                                .max = 32,
                                                .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                                }, }
                        }, }
@@ -297,7 +293,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                        .max = 48,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -319,7 +314,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
                                        .max = 64,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
index 1d9c0fc..e92ccbd 100644 (file)
@@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities kasumi_pmd_capabilities[] = {
                                        .min = 8,
                                        .max = 8,
                                        .increment = 0
-                               },
-                               .aad_size = { 0 }
+                               }
                        }, }
                }, }
        },
index c618e6b..13e7a19 100644 (file)
@@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
                                        .max = 0,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, },
                }, },
index 1db4d14..ae367ac 100644 (file)
@@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 16,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 16,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 20,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 20,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 28,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 28,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 32,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -211,7 +204,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 32,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -233,7 +225,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 48,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -255,7 +246,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 48,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -277,7 +267,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 64,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
@@ -299,7 +288,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
                                        .max = 64,
                                        .increment = 0
                                },
-                               .aad_size = { 0 },
                                .iv_size = { 0 }
                        }, }
                }, }
index fee8ee1..16b2c11 100644 (file)
@@ -52,7 +52,6 @@
                                        .max = 20,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
@@ -74,7 +73,6 @@
                                        .max = 28,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
@@ -96,7 +94,6 @@
                                        .max = 32,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
                                        .max = 48,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
                                        .max = 64,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
                                        .max = 16,                      \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, }                                            \
                }, }                                                    \
                                        .min = 16,                      \
                                        .max = 16,                      \
                                        .increment = 0                  \
-                               },                                      \
-                               .aad_size = { 0 }                       \
+                               }                                       \
                        }, }                                            \
                }, }                                                    \
        },                                                              \
                                        .max = 0,                       \
                                        .increment = 0                  \
                                },                                      \
-                               .aad_size = { 0 },                      \
                                .iv_size = { 0 }                        \
                        }, },                                           \
                }, },                                                   \
                                        .min = 8,                       \
                                        .max = 8,                       \
                                        .increment = 0                  \
-                               },                                      \
-                               .aad_size = { 0 }                       \
+                               }                                       \
                        }, }                                            \
                }, }                                                    \
        },                                                              \
                                        .min = 16,                      \
                                        .max = 16,                      \
                                        .increment = 0                  \
-                               },                                      \
-                               .aad_size = { 0 }                       \
+                               }                                       \
                        }, }                                            \
                }, }                                                    \
        }
index 108f251..62ba3a6 100644 (file)
@@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
                                        .min = 16,
                                        .max = 16,
                                        .increment = 0
-                               },
-                               .aad_size = { 0 }
+                               }
                        }, }
                }, }
        },
index 7cb3f1c..7624e67 100644 (file)
@@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities zuc_pmd_capabilities[] = {
                                        .min = 16,
                                        .max = 16,
                                        .increment = 0
-                               },
-                               .aad_size = { 0 }
+                               }
                        }, }
                }, }
        },
index 8ee5d47..bdea267 100644 (file)
@@ -311,8 +311,7 @@ rte_cryptodev_sym_capability_check_cipher(
 int
 rte_cryptodev_sym_capability_check_auth(
                const struct rte_cryptodev_symmetric_capability *capability,
-               uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
-               uint16_t iv_size)
+               uint16_t key_size, uint16_t digest_size, uint16_t iv_size)
 {
        if (param_range_check(key_size, capability->auth.key_size))
                return -1;
@@ -320,9 +319,6 @@ rte_cryptodev_sym_capability_check_auth(
        if (param_range_check(digest_size, capability->auth.digest_size))
                return -1;
 
-       if (param_range_check(aad_size, capability->auth.aad_size))
-               return -1;
-
        if (param_range_check(iv_size, capability->auth.iv_size))
                return -1;
 
index 1d975e5..756c00b 100644 (file)
@@ -238,7 +238,6 @@ rte_cryptodev_sym_capability_check_cipher(
  * @param      capability      Description of the symmetric crypto capability.
  * @param      key_size        Auth key size.
  * @param      digest_size     Auth digest size.
- * @param      aad_size        Auth aad size.
  * @param      iv_size         Auth initial vector size.
  *
  * @return
@@ -248,8 +247,7 @@ rte_cryptodev_sym_capability_check_cipher(
 int
 rte_cryptodev_sym_capability_check_auth(
                const struct rte_cryptodev_symmetric_capability *capability,
-               uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
-               uint16_t iv_size);
+               uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
 
 /**
  * Check if key, digest, AAD and initial vector sizes are supported