1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #ifndef __CN9K_IPSEC_H__
6 #define __CN9K_IPSEC_H__
8 #include "cnxk_ipsec.h"
9 #include "cnxk_security.h"
10 #include "cnxk_security_ar.h"
12 struct cn9k_ipsec_sa {
15 struct roc_ie_on_inb_sa in_sa;
17 struct roc_ie_on_outb_sa out_sa;
19 /** IPsec SA direction */
20 enum rte_security_ipsec_sa_direction dir;
21 /** Pre-populated CPT inst words */
22 struct cnxk_cpt_inst_tmpl inst;
23 /** Cipher IV offset in bytes */
24 uint16_t cipher_iv_off;
25 /** Cipher IV length in bytes */
26 uint8_t cipher_iv_len;
27 /** Outbound custom header length */
28 uint8_t custom_hdr_len;
29 /** Response length calculation data */
30 struct cnxk_ipsec_outb_rlens rlens;
42 struct cnxk_on_ipsec_ar ar;
43 /** Anti replay window size */
44 uint32_t replay_win_sz;
47 struct cn9k_sec_session {
48 struct cn9k_ipsec_sa sa;
49 } __rte_cache_aligned;
51 void cn9k_sec_ops_override(void);
53 #endif /* __CN9K_IPSEC_H__ */