[11/15] crypto/cnxk: minor shuffling in the sess structure

Message ID 20230921114820.2526810-12-ktejasree@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series fixes and improvements to cnxk crypto PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tejasree Kondoj Sept. 21, 2023, 11:48 a.m. UTC
  From: Vidya Sagar Velumuri <vvelumuri@marvell.com>

Shuffle the fields in the session structure to make the fields byte
aligned

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
 drivers/crypto/cnxk/cnxk_se.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
  

Patch

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index fdc1f3651c..1fbae54c76 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -31,30 +31,30 @@  enum cpt_dp_thread_type {
 
 struct cnxk_se_sess {
 	struct rte_cryptodev_sym_session rte_sess;
-	uint16_t cpt_op : 4;
-	uint16_t zsk_flag : 4;
-	uint16_t aes_gcm : 1;
-	uint16_t aes_ccm : 1;
-	uint16_t aes_ctr : 1;
-	uint16_t chacha_poly : 1;
-	uint16_t is_null : 1;
-	uint16_t is_gmac : 1;
-	uint16_t chained_op : 1;
-	uint16_t auth_first : 1;
-	uint16_t aes_ctr_eea2 : 1;
-	uint16_t zs_cipher : 4;
-	uint16_t zs_auth : 4;
-	uint16_t dp_thr_type : 8;
-	uint16_t aad_length;
+	uint8_t aes_gcm : 1;
+	uint8_t aes_ccm : 1;
+	uint8_t aes_ctr : 1;
+	uint8_t chacha_poly : 1;
+	uint8_t is_null : 1;
+	uint8_t is_gmac : 1;
+	uint8_t chained_op : 1;
+	uint8_t auth_first : 1;
+	uint8_t aes_ctr_eea2 : 1;
 	uint8_t is_sha3 : 1;
 	uint8_t short_iv : 1;
 	uint8_t is_sm3 : 1;
 	uint8_t passthrough : 1;
 	uint8_t is_sm4 : 1;
-	uint8_t rsvd : 3;
+	uint8_t rsvd : 2;
+	uint8_t cpt_op : 4;
+	uint8_t zsk_flag : 4;
+	uint8_t zs_cipher : 4;
+	uint8_t zs_auth : 4;
+	uint8_t dp_thr_type;
 	uint8_t mac_len;
 	uint8_t iv_length;
 	uint8_t auth_iv_length;
+	uint16_t aad_length;
 	uint16_t iv_offset;
 	uint16_t auth_iv_offset;
 	uint32_t salt;