668282f7aae4e0d4ad8fb6947c873a439ac3bd7a
[dpdk.git] / drivers / crypto / cnxk / cn10k_ipsec.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #ifndef __CN10K_IPSEC_H__
6 #define __CN10K_IPSEC_H__
7
8 #include <rte_security.h>
9
10 #include "cnxk_ipsec.h"
11
12 #define CN10K_IPSEC_SA_CTX_HDR_SIZE 1
13
14 struct cn10k_ipsec_sa {
15         union {
16                 /** Inbound SA */
17                 struct roc_ot_ipsec_inb_sa in_sa;
18                 /** Outbound SA */
19                 struct roc_ot_ipsec_outb_sa out_sa;
20         };
21         /** Pre-populated CPT inst words */
22         struct cnxk_cpt_inst_tmpl inst;
23         uint8_t partial_len;
24         uint8_t roundup_len;
25         uint8_t roundup_byte;
26 };
27
28 struct cn10k_sec_session {
29         struct cn10k_ipsec_sa sa;
30         void *userdata;
31         /**< Userdata registered by the application */
32 } __rte_cache_aligned;
33
34 void cn10k_sec_ops_override(void);
35
36 #endif /* __CN10K_IPSEC_H__ */