net/ixgbe: fix MAC resource leak
[dpdk.git] / drivers / crypto / octeontx2 / otx2_security.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (C) 2020 Marvell International Ltd.
3  */
4
5 #ifndef __OTX2_SECURITY_H__
6 #define __OTX2_SECURITY_H__
7
8 #include <rte_security.h>
9
10 #include "otx2_cryptodev_sec.h"
11 #include "otx2_ethdev_sec.h"
12
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
19
20 #define OTX2_SEC_AES_GCM_ROUNDUP_BYTE_LEN       4
21 #define OTX2_SEC_AES_CBC_ROUNDUP_BYTE_LEN       16
22
23 struct otx2_sec_session_ipsec {
24         union {
25                 struct otx2_sec_session_ipsec_ip ip;
26                 struct otx2_sec_session_ipsec_lp lp;
27         };
28         enum rte_security_ipsec_sa_direction dir;
29 };
30
31 struct otx2_sec_session {
32         struct otx2_sec_session_ipsec ipsec;
33         void *userdata;
34         /**< Userdata registered by the application */
35 } __rte_cache_aligned;
36
37 #endif /* __OTX2_SECURITY_H__ */