{
memset(sess, 0, mp->elt_size);
- sess->mp = mp;
-
if (dev->dev_ops->session_initialize)
(*dev->dev_ops->session_initialize)(mp, sess);
}
dev_id);
/* Return session to mempool */
- rte_mempool_put(sess->mp, _sess);
+ rte_mempool_put(dev->data->session_pool, _sess);
return NULL;
}
dev->dev_ops->session_clear(dev, (void *)sess->_private);
/* Return session to mempool */
- rte_mempool_put(sess->mp, (void *)sess);
+ struct rte_mempool *mp = rte_mempool_from_obj(sess);
+ rte_mempool_put(mp, (void *)sess);
return NULL;
}
/** Cryptodev symmetric crypto session */
struct rte_cryptodev_sym_session {
RTE_STD_C11
- struct {
- struct rte_mempool *mp;
- /**< Mempool session allocated from */
- } __rte_aligned(8);
- /**< Public symmetric session details */
-
__extension__ char _private[0];
/**< Private session material */
};