From: Fiona Trahe Date: Wed, 30 Mar 2016 12:49:55 +0000 (+0100) Subject: drivers: fix build of crypto anonymous union initialization X-Git-Tag: spdx-start~7127 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ff150afd7eb6f98282a34a6e409300ce5efa6377;p=dpdk.git drivers: fix build of crypto anonymous union initialization In SUSE11-SP3 i686 platform, with gcc 4.5.1, there are compile issues, e.g: null_crypto_pmd_ops.c:44:3: error: unknown field 'sym' specified in initializer cc1: warnings being treated as errors The member in anonymous union initialization should be inside '{}', otherwise it will report an error. Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery") Signed-off-by: Michael Qiu Signed-off-by: Fiona Trahe --- diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c index 387f8d100c..4dec8dd5f4 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c @@ -41,9 +41,9 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = { { /* AES GCM (AUTH) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_AES_GCM, .block_size = 16, .key_size = { @@ -61,14 +61,14 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = { .max = 12, .increment = 4 } - } - } + }, } + }, } }, { /* AES GCM (CIPHER) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_AES_GCM, .block_size = 16, .key_size = { @@ -81,8 +81,8 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index 5a439e6b0c..3806a66eae 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -42,9 +42,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { { /* MD5 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_MD5_HMAC, .block_size = 64, .key_size = { @@ -58,14 +58,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA1 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA1_HMAC, .block_size = 64, .key_size = { @@ -79,14 +79,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA224 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA224_HMAC, .block_size = 64, .key_size = { @@ -100,14 +100,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA256 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA256_HMAC, .block_size = 64, .key_size = { @@ -121,14 +121,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA384 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA384_HMAC, .block_size = 128, .key_size = { @@ -142,14 +142,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA512 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA512_HMAC, .block_size = 128, .key_size = { @@ -163,14 +163,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* AES XCBC HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC, .block_size = 16, .key_size = { @@ -184,14 +184,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* AES CBC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_AES_CBC, .block_size = 16, .key_size = { @@ -204,8 +204,8 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c index 39f8088d98..cf1a5196ff 100644 --- a/drivers/crypto/null/null_crypto_pmd_ops.c +++ b/drivers/crypto/null/null_crypto_pmd_ops.c @@ -41,9 +41,9 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] = { { /* NULL (AUTH) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_NULL, .block_size = 1, .key_size = { @@ -57,14 +57,14 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] = .increment = 0 }, .aad_size = { 0 } - } - } + }, }, + }, }, }, { /* NULL (CIPHER) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_NULL, .block_size = 1, .key_size = { @@ -77,8 +77,8 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] = .max = 0, .increment = 0 } - } - } + }, }, + }, } }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 29c1fe5276..5c41a89817 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -71,9 +71,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { { /* SHA1 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA1_HMAC, .block_size = 64, .key_size = { @@ -87,14 +87,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA256 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA256_HMAC, .block_size = 64, .key_size = { @@ -108,14 +108,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* SHA512 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SHA512_HMAC, .block_size = 128, .key_size = { @@ -129,14 +129,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* AES XCBC MAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC, .block_size = 16, .key_size = { @@ -150,14 +150,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .increment = 0 }, .aad_size = { 0 } - } - } + }, } + }, } }, { /* AES GCM (AUTH) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_AES_GCM, .block_size = 16, .key_size = { @@ -175,14 +175,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .max = 12, .increment = 4 } - } - } + }, } + }, } }, { /* SNOW3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, .block_size = 16, .key_size = { @@ -200,14 +200,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, { /* AES GCM (CIPHER) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_AES_GCM, .block_size = 16, .key_size = { @@ -220,15 +220,15 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, { /* AES CBC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { - RTE_CRYPTO_CIPHER_AES_CBC, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_CBC, .block_size = 16, .key_size = { .min = 16, @@ -240,14 +240,14 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, { /* SNOW3G (UEA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, .block_size = 16, .key_size = { @@ -260,8 +260,8 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c index 74eee23031..6f00b066f6 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c @@ -41,9 +41,9 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { { /* SNOW3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { + {.auth = { .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, .block_size = 16, .key_size = { @@ -61,14 +61,14 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, { /* SNOW3G (UEA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, - .sym = { + {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { + {.cipher = { .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, .block_size = 16, .key_size = { @@ -81,8 +81,8 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { .max = 16, .increment = 0 } - } - } + }, } + }, } }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() };