[dpdk-dev] [PATCH v2 06/11] cryptodev: remove dev_id from crypto session

Pablo de Lara pablo.de.lara.guarch at intel.com
Fri Jun 30 19:09:28 CEST 2017


From: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>

Device id is necessary in the crypto session,
as it was only used for the functions that attach/detach
a session to a queue pair.

Since the session is not going to be attached to a device
anymore, this is field is no longer necessary.

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
 doc/guides/rel_notes/release_17_08.rst | 1 +
 lib/librte_cryptodev/rte_cryptodev.c   | 1 -
 lib/librte_cryptodev/rte_cryptodev.h   | 2 --
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst
index fe46d93..df66525 100644
--- a/doc/guides/rel_notes/release_17_08.rst
+++ b/doc/guides/rel_notes/release_17_08.rst
@@ -160,6 +160,7 @@ API Changes
   * ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` functions require
     the new parameter ``device id``.
+  * ``dev_id`` field has been removed from ``rte_cryptodev_sym_session`` structure.
 
 
 ABI Changes
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 1852ecf..0b381ba 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1026,7 +1026,6 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp,
 {
 	memset(sess, 0, mp->elt_size);
 
-	sess->dev_id = dev->data->dev_id;
 	sess->driver_id = dev->driver_id;
 	sess->mp = mp;
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index d3d2794..77a763d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -798,8 +798,6 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
 struct rte_cryptodev_sym_session {
 	RTE_STD_C11
 	struct {
-		uint8_t dev_id;
-		/**< Device Id */
 		uint8_t driver_id;
 		/** Crypto driver identifier session created on */
 		struct rte_mempool *mp;
-- 
2.9.4



More information about the dev mailing list