From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CE4D82B91 for ; Wed, 30 Mar 2016 14:59:57 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 30 Mar 2016 05:59:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,416,1455004800"; d="scan'208";a="934684659" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 30 Mar 2016 05:59:55 -0700 Received: from linux.site (sisvmlab045.ir.intel.com [10.237.216.57]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u2UCxtf1008323; Wed, 30 Mar 2016 13:59:55 +0100 Received: by linux.site (Postfix, from userid 11342333) id 19C8CE3BBE; Wed, 30 Mar 2016 13:51:13 +0100 (IST) From: Fiona Trahe To: dev@dpdk.org Cc: Declan.doherty@intel.com, Fiona Trahe , Michael Qiu Date: Wed, 30 Mar 2016 13:49:55 +0100 Message-Id: <1459342195-29783-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1458890426-20688-3-git-send-email-michael.qiu@intel.com> References: <1458890426-20688-3-git-send-email-michael.qiu@intel.com> Subject: [dpdk-dev] [PATCH v2] drivers/crypto: Fix anonymous union initialization in crypto PMDs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 12:59:58 -0000 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") v2: - extends fix to cover all crypto pmds. Signed-off-by: Michael Qiu Signed-off-by: Fiona Trahe --- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 16 +++--- drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 64 +++++++++++----------- drivers/crypto/null/null_crypto_pmd_ops.c | 16 +++--- drivers/crypto/qat/qat_crypto.c | 74 +++++++++++++------------- drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 16 +++--- 5 files changed, 93 insertions(+), 93 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c index 387f8d1..4dec8dd 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 5a439e6..3806a66 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 39f8088..cf1a519 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 29c1fe5..5c41a89 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 74eee23..6f00b06 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() }; -- 2.1.0