[dpdk-dev] [PATCH v4 01/12] cryptodev: remove unused cryptodev session structure

Pablo de Lara pablo.de.lara.guarch at intel.com
Wed Jul 5 07:26:09 CEST 2017


Cryptodev session structure was a duplication of the
cryptodev symmetric structure.
It was used by some PMDs that should use the symmetric
structure instead.

Since this structure was internal, there is no deprecation
notice required.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
 drivers/crypto/kasumi/rte_kasumi_pmd.c   |  2 +-
 drivers/crypto/null/null_crypto_pmd.c    |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c   |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c         |  2 +-
 examples/ipsec-secgw/ipsec.h             |  1 -
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 11 -----------
 6 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 6c8da17..37ca2cc 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -172,7 +172,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 
 		sess = (struct kasumi_session *)op->sym->session->_private;
 	} else  {
-		struct rte_cryptodev_session *c_sess = NULL;
+		struct rte_cryptodev_sym_session *c_sess = NULL;
 
 		if (rte_mempool_get(qp->sess_mp, (void **)&c_sess))
 			return NULL;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 84280ae..da62592 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -105,7 +105,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 
 		sess = (struct null_crypto_session *)sym_op->session->_private;
 	} else  {
-		struct rte_cryptodev_session *c_sess = NULL;
+		struct rte_cryptodev_sym_session *c_sess = NULL;
 
 		if (rte_mempool_get(qp->sess_mp, (void **)&c_sess))
 			return NULL;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 18b6f86..0c65b2d 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -172,7 +172,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 
 		sess = (struct snow3g_session *)op->sym->session->_private;
 	} else  {
-		struct rte_cryptodev_session *c_sess = NULL;
+		struct rte_cryptodev_sym_session *c_sess = NULL;
 
 		if (rte_mempool_get(qp->sess_mp, (void **)&c_sess))
 			return NULL;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 7d2e37c..82710d3 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -171,7 +171,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
 		sess = (struct zuc_session *)op->sym->session->_private;
 	} else  {
-		struct rte_cryptodev_session *c_sess = NULL;
+		struct rte_cryptodev_sym_session *c_sess = NULL;
 
 		if (rte_mempool_get(qp->sess_mp, (void **)&c_sess))
 			return NULL;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 0ef68ed..ccd0aa8 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -75,7 +75,6 @@
 
 struct rte_crypto_xform;
 struct ipsec_xform;
-struct rte_cryptodev_session;
 struct rte_mbuf;
 
 struct ipsec_sa;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index f6aa84d..5911b83 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -56,17 +56,6 @@ extern "C" {
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
 
-struct rte_cryptodev_session {
-	RTE_STD_C11
-	struct {
-		uint8_t dev_id;
-		uint8_t driver_id;
-		struct rte_mempool *mp;
-	} __rte_aligned(8);
-
-	__extension__ char _private[0];
-};
-
 /** Global structure used for maintaining state of allocated crypto devices */
 struct rte_cryptodev_global {
 	struct rte_cryptodev *devs;	/**< Device information array */
-- 
2.9.4



More information about the dev mailing list