xref: /dpdk/drivers/crypto/cnxk/cn10k_tls.h (revision 27595cd83053b2d39634a159d6709b3ce3cdf3b0)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2024 Marvell.
3  */
4 
5 #ifndef __CN10K_TLS_H__
6 #define __CN10K_TLS_H__
7 
8 #include <rte_crypto_sym.h>
9 #include <rte_security.h>
10 
11 #include "roc_ie_ot_tls.h"
12 
13 #include "cnxk_cryptodev.h"
14 #include "cnxk_cryptodev_ops.h"
15 
16 /* Forward declaration */
17 struct cn10k_sec_session;
18 
__rte_aligned(ROC_ALIGN)19 struct __rte_aligned(ROC_ALIGN) cn10k_tls_record {
20 	union {
21 		/** Read SA */
22 		struct roc_ie_ot_tls_read_sa read_sa;
23 		/** Write SA */
24 		struct roc_ie_ot_tls_write_sa write_sa;
25 	};
26 };
27 
28 int cn10k_tls_record_session_update(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp,
29 				    struct cn10k_sec_session *sess,
30 				    struct rte_security_session_conf *conf);
31 
32 int cn10k_tls_record_session_create(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp,
33 				    struct rte_security_tls_record_xform *tls_xfrm,
34 				    struct rte_crypto_sym_xform *crypto_xfrm,
35 				    struct rte_security_session *sess);
36 
37 int cn10k_sec_tls_session_destroy(struct cnxk_cpt_qp *qp, struct cn10k_sec_session *sess);
38 
39 #endif /* __CN10K_TLS_H__ */
40