]> git.droids-corp.org - dpdk.git/blobdiff - drivers/crypto/octeontx2/otx2_security.h
crypto/octeontx2: fix IPsec session member overlap
[dpdk.git] / drivers / crypto / octeontx2 / otx2_security.h
index 9f1ba71b46ce20229378c3b96c3b6a200f9b446e..29c8fc351b159c4120617266fbc0a020050053f0 100644 (file)
 #define OTX2_SEC_AES_GCM_ROUNDUP_BYTE_LEN      4
 #define OTX2_SEC_AES_CBC_ROUNDUP_BYTE_LEN      16
 
 #define OTX2_SEC_AES_GCM_ROUNDUP_BYTE_LEN      4
 #define OTX2_SEC_AES_CBC_ROUNDUP_BYTE_LEN      16
 
-union otx2_sec_session_ipsec {
-       struct otx2_sec_session_ipsec_ip ip;
-       struct otx2_sec_session_ipsec_lp lp;
+struct otx2_sec_session_ipsec {
+       union {
+               struct otx2_sec_session_ipsec_ip ip;
+               struct otx2_sec_session_ipsec_lp lp;
+       };
        enum rte_security_ipsec_sa_direction dir;
 };
 
 struct otx2_sec_session {
        enum rte_security_ipsec_sa_direction dir;
 };
 
 struct otx2_sec_session {
-       union otx2_sec_session_ipsec ipsec;
+       struct otx2_sec_session_ipsec ipsec;
        void *userdata;
        /**< Userdata registered by the application */
 } __rte_cache_aligned;
        void *userdata;
        /**< Userdata registered by the application */
 } __rte_cache_aligned;