{
struct aesni_gcm_session *sess = NULL;
- if (op->type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
- if (unlikely(op->session->type != RTE_CRYPTODEV_AESNI_GCM_PMD))
+ if (op->sess_type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
+ if (unlikely(op->session->dev_type
+ != RTE_CRYPTODEV_AESNI_GCM_PMD))
return sess;
sess = (struct aesni_gcm_session *)op->session->_private;
post_process_gcm_crypto_op(op);
/* Free session if a session-less crypto op */
- if (op->sym->type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
+ if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
{
struct aesni_mb_session *sess = NULL;
- if (op->sym->type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->type !=
+ if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
+ if (unlikely(op->sym->session->dev_type !=
RTE_CRYPTODEV_AESNI_MB_PMD))
return NULL;
}
/* Free session if a session-less crypto op */
- if (op->sym->type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
+ if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
{
struct null_crypto_session *sess;
- if (op->type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
+ if (op->sess_type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
if (unlikely(op->session == NULL ||
- op->session->type != RTE_CRYPTODEV_NULL_PMD))
+ op->session->dev_type != RTE_CRYPTODEV_NULL_PMD))
return NULL;
sess = (struct null_crypto_session *)op->session->_private;
return -EINVAL;
}
#endif
- if (unlikely(op->sym->type == RTE_CRYPTO_SYM_OP_SESSIONLESS)) {
+ if (unlikely(op->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS)) {
PMD_DRV_LOG(ERR, "QAT PMD only supports session oriented"
" requests, op (%p) is sessionless.", op);
return -EINVAL;
}
- if (unlikely(op->sym->session->type != RTE_CRYPTODEV_QAT_SYM_PMD)) {
+ if (unlikely(op->sym->session->dev_type != RTE_CRYPTODEV_QAT_SYM_PMD)) {
PMD_DRV_LOG(ERR, "Session was not created for this device");
return -EINVAL;
}
{
struct snow3g_session *sess;
- if (op->sym->type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->type !=
+ if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
+ if (unlikely(op->sym->session->dev_type !=
RTE_CRYPTODEV_SNOW3G_PMD))
return NULL;
if (ops[i]->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)
ops[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
/* Free session if a session-less crypto op. */
- if (ops[i]->sym->type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
+ if (ops[i]->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
}
struct rte_mbuf *m_src; /**< source mbuf */
struct rte_mbuf *m_dst; /**< destination mbuf */
- enum rte_crypto_sym_op_sess_type type;
+ enum rte_crypto_sym_op_sess_type sess_type;
union {
struct rte_cryptodev_sym_session *session;
{
memset(op, 0, sizeof(*op));
- op->type = RTE_CRYPTO_SYM_OP_SESSIONLESS;
+ op->sess_type = RTE_CRYPTO_SYM_OP_SESSIONLESS;
}
struct rte_cryptodev_sym_session *sess)
{
sym_op->session = sess;
- sym_op->type = RTE_CRYPTO_SYM_OP_WITH_SESSION;
+ sym_op->sess_type = RTE_CRYPTO_SYM_OP_WITH_SESSION;
return 0;
}
memset(sess, 0, mp->elt_size);
sess->dev_id = dev->data->dev_id;
- sess->type = dev->dev_type;
+ sess->dev_type = dev->dev_type;
sess->mp = mp;
if (dev->dev_ops->session_initialize)
dev = &rte_crypto_devices[dev_id];
/* Check the session belongs to this device type */
- if (sess->type != dev->dev_type)
+ if (sess->dev_type != dev->dev_type)
return sess;
/* Let device implementation clear session material */
struct {
uint8_t dev_id;
/**< Device Id */
- enum rte_cryptodev_type type;
+ enum rte_cryptodev_type dev_type;
/** Crypto Device type session created on */
struct rte_mempool *mp;
/**< Mempool session allocated from */