From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: Declan.doherty@intel.com, Fiona Trahe <fiona.trahe@intel.com>,
Michael Qiu <michael.qiu@intel.com>
Subject: [dpdk-dev] [PATCH v2] drivers/crypto: Fix anonymous union initialization in crypto PMDs
Date: Wed, 30 Mar 2016 13:49:55 +0100 [thread overview]
Message-ID: <1459342195-29783-1-git-send-email-fiona.trahe@intel.com> (raw)
In-Reply-To: <1458890426-20688-3-git-send-email-michael.qiu@intel.com>
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 <michael.qiu@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
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
next prev parent reply other threads:[~2016-03-30 12:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-25 7:20 [dpdk-dev] [PATCH 0/2] Compile fixes in SUSE11 SP3 i686 platform Michael Qiu
2016-03-25 7:20 ` [dpdk-dev] [PATCH 1/2] lib/librte_lpm: Fix anonymous union initialization issue Michael Qiu
2016-03-25 17:02 ` Stephen Hemminger
2016-03-30 3:38 ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
2016-03-25 7:20 ` [dpdk-dev] [PATCH 2/2] drivers/crypto: Fix anonymous union initialization in crypto Michael Qiu
2016-03-25 10:48 ` Trahe, Fiona
2016-03-30 12:49 ` Fiona Trahe [this message]
2016-03-31 19:32 ` [dpdk-dev] [PATCH 0/2] Compile fixes in SUSE11 SP3 i686 platform Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459342195-29783-1-git-send-email-fiona.trahe@intel.com \
--to=fiona.trahe@intel.com \
--cc=Declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=michael.qiu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).