[PATCH v2 50/83] crypto/uadk: move alignment attribute on types
Tyler Retzlaff
roretzla at linux.microsoft.com
Mon Apr 15 22:04:12 CEST 2024
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 at linux.microsoft.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
drivers/crypto/uadk/uadk_crypto_pmd_private.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
index 5a7dbff..7a35c94 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h
+++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
@@ -9,7 +9,7 @@
/* Maximum length for digest (SHA-512 needs 64 bytes) */
#define DIGEST_LENGTH_MAX 64
-struct uadk_qp {
+struct __rte_cache_aligned uadk_qp {
/* Ring for placing process packets */
struct rte_ring *processed_pkts;
/* Queue pair statistics */
@@ -23,7 +23,7 @@ struct uadk_qp {
* by the user (using authentication verify operation)
*/
uint8_t temp_digest[DIGEST_LENGTH_MAX];
-} __rte_cache_aligned;
+};
enum uadk_chain_order {
UADK_CHAIN_ONLY_CIPHER,
@@ -33,7 +33,7 @@ enum uadk_chain_order {
UADK_CHAIN_NOT_SUPPORTED
};
-struct uadk_crypto_session {
+struct __rte_cache_aligned uadk_crypto_session {
handle_t handle_cipher;
handle_t handle_digest;
enum uadk_chain_order chain_order;
@@ -56,19 +56,19 @@ struct uadk_crypto_session {
enum rte_crypto_auth_operation operation;
uint16_t digest_length;
} auth;
-} __rte_cache_aligned;
+};
enum uadk_crypto_version {
UADK_CRYPTO_V2,
UADK_CRYPTO_V3,
};
-struct uadk_crypto_priv {
+struct __rte_cache_aligned uadk_crypto_priv {
bool env_cipher_init;
bool env_auth_init;
enum uadk_crypto_version version;
unsigned int max_nb_qpairs;
-} __rte_cache_aligned;
+};
extern int uadk_crypto_logtype;
--
1.8.3.1
More information about the dev
mailing list