Move location of __rte_aligned(a) to new conventional location. The new
placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for both C and C++. Additionally, it avoids confusion by Doxygen
when generating documentation.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
drivers/crypto/mvsam/mrvl_pmd_private.h | 12 ++++++------
drivers/crypto/mvsam/rte_mrvl_pmd.c | 12 +++++-------
2 files changed, 11 insertions(+), 13 deletions(-)
@@ -44,7 +44,7 @@ struct mrvl_crypto_private {
};
/** MRVL crypto queue pair structure. */
-struct mrvl_crypto_qp {
+struct __rte_cache_aligned mrvl_crypto_qp {
/** SAM CIO (MUSDK Queue Pair equivalent).*/
struct sam_cio *cio;
@@ -59,10 +59,10 @@ struct mrvl_crypto_qp {
/** CIO initialization parameters.*/
struct sam_cio_params cio_params;
-} __rte_cache_aligned;
+};
/** MRVL crypto private session structure. */
-struct mrvl_crypto_session {
+struct __rte_cache_aligned mrvl_crypto_session {
/** Crypto operations chain order. */
enum mrvl_crypto_chain_order chain_order;
@@ -74,12 +74,12 @@ struct mrvl_crypto_session {
/** Cipher IV offset. */
uint16_t cipher_iv_offset;
-} __rte_cache_aligned;
+};
-struct mrvl_crypto_src_table {
+struct __rte_cache_aligned mrvl_crypto_src_table {
uint16_t iter_ops;
struct sam_buf_info src_bd[MRVL_MAX_SEGMENTS];
-} __rte_cache_aligned;
+};
/** Set and validate MRVL crypto session parameters */
int
@@ -47,22 +47,20 @@ enum algo_supported {
};
/** Map elements for cipher mapping.*/
-struct cipher_params_mapping {
+/* We want to squeeze in multiple maps into the cache line. */
+struct __rte_aligned(32) cipher_params_mapping {
enum algo_supported supported; /**< On/Off switch */
enum sam_cipher_alg cipher_alg; /**< Cipher algorithm */
enum sam_cipher_mode cipher_mode; /**< Cipher mode */
unsigned int max_key_len; /**< Maximum key length (in bytes)*/
-}
-/* We want to squeeze in multiple maps into the cache line. */
-__rte_aligned(32);
+};
/** Map elements for auth mapping.*/
-struct auth_params_mapping {
+/* We want to squeeze in multiple maps into the cache line. */
+struct __rte_aligned(32) auth_params_mapping {
enum algo_supported supported; /**< On/off switch */
enum sam_auth_alg auth_alg; /**< Auth algorithm */
}
-/* We want to squeeze in multiple maps into the cache line. */
-__rte_aligned(32);
/**
* Map of supported cipher algorithms.