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 /** Response length calculation data */
28 struct cnxk_ipsec_outb_rlens rlens;
40 struct cnxk_on_ipsec_ar ar;
41 /** Anti replay window size */
42 uint32_t replay_win_sz;
45 struct cn9k_sec_session {
46 struct cn9k_ipsec_sa sa;
47 } __rte_cache_aligned;
49 void cn9k_sec_ops_override(void);
51 #endif /* __CN9K_IPSEC_H__ */