2020-02-04 11:17:17 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2021-04-26 12:21:06 +00:00
|
|
|
* Copyright (C) 2020-2021 Marvell.
|
2020-02-04 11:17:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _OTX2_CRYPTODEV_QP_H_
|
|
|
|
#define _OTX2_CRYPTODEV_QP_H_
|
|
|
|
|
|
|
|
#include <rte_common.h>
|
2020-10-08 10:34:34 +00:00
|
|
|
#include <rte_eventdev.h>
|
2020-02-04 11:17:17 +00:00
|
|
|
#include <rte_mempool.h>
|
|
|
|
#include <rte_spinlock.h>
|
|
|
|
|
|
|
|
#include "cpt_common.h"
|
|
|
|
|
|
|
|
struct otx2_cpt_qp {
|
|
|
|
uint32_t id;
|
|
|
|
/**< Queue pair id */
|
2020-12-31 17:52:57 +00:00
|
|
|
uint8_t blkaddr;
|
|
|
|
/**< CPT0/1 BLKADDR of LF */
|
2020-02-04 11:17:17 +00:00
|
|
|
uintptr_t base;
|
|
|
|
/**< Base address where BAR is mapped */
|
|
|
|
void *lmtline;
|
|
|
|
/**< Address of LMTLINE */
|
|
|
|
rte_iova_t lf_nq_reg;
|
|
|
|
/**< LF enqueue register address */
|
|
|
|
struct pending_queue pend_q;
|
|
|
|
/**< Pending queue */
|
|
|
|
struct rte_mempool *sess_mp;
|
|
|
|
/**< Session mempool */
|
|
|
|
struct rte_mempool *sess_mp_priv;
|
|
|
|
/**< Session private data mempool */
|
|
|
|
struct cpt_qp_meta_info meta_info;
|
|
|
|
/**< Metabuf info required to support operations on the queue pair */
|
|
|
|
rte_iova_t iq_dma_addr;
|
|
|
|
/**< Instruction queue address */
|
2020-10-08 10:34:34 +00:00
|
|
|
struct rte_event ev;
|
|
|
|
/**< Event information required for binding cryptodev queue to
|
|
|
|
* eventdev queue. Used by crypto adapter.
|
|
|
|
*/
|
|
|
|
uint8_t ca_enable;
|
|
|
|
/**< Set when queue pair is added to crypto adapter */
|
2021-04-26 12:21:06 +00:00
|
|
|
uint8_t qp_ev_bind;
|
|
|
|
/**< Set when queue pair is bound to event queue */
|
2020-02-04 11:17:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _OTX2_CRYPTODEV_QP_H_ */
|