[dpdk-dev] [PATCH v7 01/10] cryptodev: add opaque userdata pointer into crypto sym session

Konstantin Ananyev konstantin.ananyev at intel.com
Thu Jan 10 15:20:50 CET 2019


Add 'uint64_t opaque_data' inside struct rte_cryptodev_sym_session.
That allows upper layer to easily associate some user defined
data with the session.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Fiona Trahe <fiona.trahe at intel.com>
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal at intel.com>
Acked-by: Declan Doherty <declan.doherty at intel.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 doc/guides/rel_notes/release_19_02.rst | 5 +++++
 lib/librte_cryptodev/Makefile          | 4 ++--
 lib/librte_cryptodev/meson.build       | 4 ++--
 lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index 22c2dff4e..9aa482a84 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -178,6 +178,11 @@ ABI Changes
 * mbuf: The format of the sched field of ``rte_mbuf`` has been changed
   to include the following fields: ``queue ID``, ``traffic class``, ``color``.
 
+* cryptodev: New field ``uint64_t opaque_data`` is added into
+  ``rte_cryptodev_sym_session`` structure. That would allow upper layer to
+  easily associate/de-associate some user defined data with the
+  cryptodev session.
+
 
 Shared Library Versions
 -----------------------
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index a8f94c097..e38018183 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2015 Intel Corporation
+# Copyright(c) 2015-2019 Intel Corporation
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
@@ -7,7 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_cryptodev.a
 
 # library version
-LIBABIVER := 5
+LIBABIVER := 6
 
 # build flags
 CFLAGS += -O3
diff --git a/lib/librte_cryptodev/meson.build b/lib/librte_cryptodev/meson.build
index 990dd3d44..44bd83212 100644
--- a/lib/librte_cryptodev/meson.build
+++ b/lib/librte_cryptodev/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2019 Intel Corporation
 
-version = 5
+version = 6
 sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c')
 headers = files('rte_cryptodev.h',
 	'rte_cryptodev_pmd.h',
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 4099823f1..009860e7b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -954,6 +954,8 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
  * has a fixed algo, key, op-type, digest_len etc.
  */
 struct rte_cryptodev_sym_session {
+	uint64_t opaque_data;
+	/**< Opaque user defined data */
 	__extension__ void *sess_private_data[0];
 	/**< Private symmetric session material */
 };
-- 
2.17.1



More information about the dev mailing list