[50/83] crypto/uadk: move alignment attribute on types

Message ID 1710949096-5786-51-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers
Series move alignment attribute on types |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:37 p.m. UTC
  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/uadk/uadk_crypto_pmd_private.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

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;