Anoob Joseph f44e716377 net/octeontx2: add security session operations
Adding security session operations in eth security ctx.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-02-05 15:20:51 +01:00

38 lines
857 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(C) 2020 Marvell International Ltd.
*/
#ifndef _OTX2_SEC_IDEV_H_
#define _OTX2_SEC_IDEV_H_
#include <rte_ethdev.h>
#define OTX2_MAX_CPT_QP_PER_PORT 64
#define OTX2_MAX_INLINE_PORTS 64
struct otx2_cpt_qp;
struct otx2_sec_idev_cfg {
struct {
struct otx2_cpt_qp *qp;
rte_atomic16_t ref_cnt;
} tx_cpt[OTX2_MAX_CPT_QP_PER_PORT];
uint16_t tx_cpt_idx;
rte_spinlock_t tx_cpt_lock;
};
uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);
int otx2_sec_idev_cfg_init(int port_id);
int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);
int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);
int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);
int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);
#endif /* _OTX2_SEC_IDEV_H_ */