crypto/octeontx2: enable CPT to share QP with ethdev
[dpdk.git] / drivers / common / octeontx2 / otx2_sec_idev.h
index a5d929e..20d71d0 100644 (file)
@@ -7,6 +7,27 @@
 
 #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);
+
 #endif /* _OTX2_SEC_IDEV_H_ */