1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (C) 2020 Marvell International Ltd.
5 #ifndef __OTX2_SECURITY_H__
6 #define __OTX2_SECURITY_H__
8 #include <rte_security.h>
10 #include "otx2_cryptodev_sec.h"
11 #include "otx2_ethdev_sec.h"
13 #define OTX2_SEC_AH_HDR_LEN 12
14 #define OTX2_SEC_AES_GCM_IV_LEN 8
15 #define OTX2_SEC_AES_GCM_MAC_LEN 16
16 #define OTX2_SEC_AES_CBC_IV_LEN 16
17 #define OTX2_SEC_SHA1_HMAC_LEN 12
18 #define OTX2_SEC_SHA2_HMAC_LEN 16
20 #define OTX2_SEC_AES_GCM_ROUNDUP_BYTE_LEN 4
21 #define OTX2_SEC_AES_CBC_ROUNDUP_BYTE_LEN 16
23 struct otx2_sec_session_ipsec {
25 struct otx2_sec_session_ipsec_ip ip;
26 struct otx2_sec_session_ipsec_lp lp;
28 enum rte_security_ipsec_sa_direction dir;
31 struct otx2_sec_session {
32 struct otx2_sec_session_ipsec ipsec;
34 /**< Userdata registered by the application */
35 } __rte_cache_aligned;
37 #endif /* __OTX2_SECURITY_H__ */