Re: [PATCH 1/2] cryptodev: add min headroom and tailroom requirement
From: Joseph, Anoob <hidden>
Date: 2018-06-22 06:50:56
Hi Akhil, The change adds couple of entries in cryptodev_info structure. I was under the impression this will be an ABI change and would need one release cycle. If we can get this through in 18.08, it would be great. Do you want me to revise the patch stating it that way? Thanks, Anoob On 21-06-2018 19:54, Akhil Goyal wrote:
On 6/19/2018 11:56 AM, Anoob Joseph wrote:quoted
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 <redacted> --- 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.rstb/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.Is this targeted for 18.08 or 18.11?quoted
diff --git a/lib/librte_cryptodev/rte_cryptodev.hb/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. */