[dpdk-dev] [PATCH 1/2] cryptodev: add min headroom and tailroom requirement

Anoob Joseph anoob.joseph at caviumnetworks.com
Tue Jun 19 08:26:13 CEST 2018

Enabling crypto devs to specify the minimum headroom and tailroom it
expects in the mbuf. For net PMDs, standard headroom has to be honoured
by applications, which is not strictly followed for crypto devs. This
prevents crypto devs from using free space in mbuf (available as
head/tailroom) for internal requirements in crypto operations. Addition
of head/tailroom requirement will help PMDs to communicate such
requirements to the application.

The availability and use of head/tailroom is an optimization if the
hardware supports use of head/tailroom for crypto-op info. For devices
that do not support using the head/tailroom, they can continue to operate
without any performance-drop.

Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
 doc/guides/rel_notes/deprecation.rst | 4 ++++
 lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692e..a547289 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -122,3 +122,7 @@ Deprecation Notices
   - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
     in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
     It will be removed in 18.08.
+  - New field, ``min_headroom_req``, added in ``rte_cryptodev_info`` structure. It will be
+    added in 18.11.
+  - New field, ``min_tailroom_req``, added in ``rte_cryptodev_info`` structure. It will be
+    added in 18.11.
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d4..fa944b8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -382,6 +382,12 @@ struct rte_cryptodev_info {
 	unsigned max_nb_queue_pairs;
 	/**< Maximum number of queues pairs supported by device. */
+	uint32_t min_headroom_req;
+	/**< Minimum mbuf headroom required by device */
+	uint32_t min_tailroom_req;
+	/**< Minimum mbuf tailroom required by device */
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */

More information about the dev mailing list