diff mbox series

[2/2] crypto/armv8: adapt to updated sym session framework

Message ID 20220926100120.3980185-3-ruifeng.wang@arm.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers show
Series fixes after sym session rework | expand

Checks

Context Check Description
ci/Intel-compilation warning apply issues
ci/checkpatch success coding style OK

Commit Message

Ruifeng Wang Sept. 26, 2022, 10:01 a.m. UTC
Adapt to data structure changes.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/crypto/armv8/armv8_pmd_private.h | 2 --
 drivers/crypto/armv8/rte_armv8_pmd.c     | 4 ++--
 drivers/crypto/armv8/rte_armv8_pmd_ops.c | 5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index 75ddba79c1..41292d8851 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -106,8 +106,6 @@  struct armv8_crypto_qp {
 	/**< Ring for placing process packets */
 	struct rte_mempool *sess_mp;
 	/**< Session Mempool */
-	struct rte_mempool *sess_mp_priv;
-       /**< Session Private Data Mempool */
 	struct rte_cryptodev_stats stats;
 	/**< Queue pair statistics */
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 75a95e3689..ebca5c09ee 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -521,7 +521,7 @@  get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		/* get existing session */
 		if (likely(op->sym->session != NULL)) {
-			sess = op->sym->session->data;
+			sess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session);
 		}
 	} else {
 		/* provide internal session */
@@ -530,7 +530,7 @@  get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 		if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
 			return NULL;
 
-		sess = (struct armv8_crypto_session *)_sess->data;
+		sess = (struct armv8_crypto_session *)_sess->driver_priv_data;
 
 		if (unlikely(armv8_crypto_set_session_parameters(sess,
 				op->sym->xform) != 0)) {
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 176bb9e6a0..c4964bc112 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -244,7 +244,6 @@  armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 		goto qp_setup_cleanup;
 
 	qp->sess_mp = qp_conf->mp_session;
-	qp->sess_mp_priv = qp_conf->mp_session_private;
 
 	memset(&qp->stats, 0, sizeof(qp->stats));
 
@@ -265,7 +264,7 @@  armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess)
 {
@@ -277,7 +276,7 @@  armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		return -EINVAL;
 	}
 
-	sess_private_data = sess->data;
+	sess_private_data = sess->driver_priv_data;
 
 	ret = armv8_crypto_set_session_parameters(sess_private_data, xform);
 	if (ret != 0) {