been reorganized as follows:
* ``dev_id`` field has been removed.
+ * ``driver_id`` field has been removed.
* **Updated cryptodev library.**
struct rte_crypto_sym_op *sym_op = op->sym;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(sym_op->session->driver_id !=
- cryptodev_driver_id))
- return sess;
-
sess = (struct aesni_gcm_session *)sym_op->session->_private;
} else {
void *_sess;
{
struct aesni_mb_session *sess = NULL;
- if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->driver_id !=
- cryptodev_driver_id)) {
- return NULL;
- }
-
+ if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
sess = (struct aesni_mb_session *)op->sym->session->_private;
- } else {
+ else {
void *_sess = NULL;
if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
/* get existing session */
- if (likely(op->sym->session != NULL &&
- op->sym->session->driver_id ==
- cryptodev_driver_id)) {
+ if (likely(op->sym->session != NULL)) {
sess = (struct armv8_crypto_session *)
op->sym->session->_private;
}
struct kasumi_session *sess;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->driver_id !=
- cryptodev_driver_id))
- return NULL;
-
sess = (struct kasumi_session *)op->sym->session->_private;
} else {
struct rte_cryptodev_sym_session *c_sess = NULL;
struct rte_crypto_sym_op *sym_op = op->sym;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(sym_op->session == NULL ||
- sym_op->session->driver_id !=
- cryptodev_driver_id))
+ if (unlikely(sym_op->session == NULL))
return NULL;
sess = (struct null_crypto_session *)sym_op->session->_private;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
/* get existing session */
- if (likely(op->sym->session != NULL &&
- op->sym->session->driver_id ==
- cryptodev_driver_id))
+ if (likely(op->sym->session != NULL))
sess = (struct openssl_session *)
op->sym->session->_private;
} else {
return -EINVAL;
}
- if (unlikely(op->sym->session->driver_id !=
- cryptodev_qat_driver_id)) {
- PMD_DRV_LOG(ERR, "Session was not created for this device");
- return -EINVAL;
- }
-
ctx = (struct qat_session *)op->sym->session->_private;
qat_req = (struct icp_qat_fw_la_bulk_req *)out_msg;
rte_mov128((uint8_t *)qat_req, (const uint8_t *)&(ctx->fw_req));
struct snow3g_session *sess;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->driver_id !=
- cryptodev_driver_id))
- return NULL;
-
sess = (struct snow3g_session *)op->sym->session->_private;
} else {
struct rte_cryptodev_sym_session *c_sess = NULL;
struct zuc_session *sess;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- if (unlikely(op->sym->session->driver_id !=
- cryptodev_driver_id))
- return NULL;
-
sess = (struct zuc_session *)op->sym->session->_private;
} else {
struct rte_cryptodev_sym_session *c_sess = NULL;
{
memset(sess, 0, mp->elt_size);
- sess->driver_id = dev->driver_id;
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->driver_id != dev->driver_id)
- return sess;
-
/* Let device implementation clear session material */
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->session_clear, sess);
dev->dev_ops->session_clear(dev, (void *)sess->_private);
struct rte_cryptodev_sym_session {
RTE_STD_C11
struct {
- uint8_t driver_id;
- /** Crypto driver identifier session created on */
struct rte_mempool *mp;
/**< Mempool session allocated from */
} __rte_aligned(8);