1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
5 #ifndef _OTX2_SEC_IDEV_H_
6 #define _OTX2_SEC_IDEV_H_
8 #include <rte_ethdev.h>
10 #define OTX2_MAX_CPT_QP_PER_PORT 64
11 #define OTX2_MAX_INLINE_PORTS 64
15 struct otx2_sec_idev_cfg {
17 struct otx2_cpt_qp *qp;
18 rte_atomic16_t ref_cnt;
19 } tx_cpt[OTX2_MAX_CPT_QP_PER_PORT];
22 rte_spinlock_t tx_cpt_lock;
25 uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);
27 int otx2_sec_idev_cfg_init(int port_id);
29 int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);
31 int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);
33 int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);
35 int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);
37 #endif /* _OTX2_SEC_IDEV_H_ */