From: Anoob Joseph Date: Tue, 10 Jul 2018 14:42:37 +0000 (+0530) Subject: cryptodev: add min headroom and tailroom requirement X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=db10602b76f2d90a076538bccc6a07728036cd5a;p=dpdk.git cryptodev: add min headroom and tailroom requirement 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 Acked-by: Pablo de Lara --- diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index cbd4b412d8..d41546c273 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -86,6 +86,10 @@ API Changes has been replaced with field ``struct rte_device *device``. Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device supports an unlimited number of sessions. + Two new fields of type ``uint16_t`` have been added: + ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. + These parameters specify the recommended headroom and tailroom for mbufs + to be processed by the PMD. * cryptodev: Following functions were deprecated and are removed in 18.08: diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 4b279f8608..3bba4e1b0f 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -366,6 +366,12 @@ struct rte_cryptodev_info { unsigned max_nb_queue_pairs; /**< Maximum number of queues pairs supported by device. */ + uint16_t min_mbuf_headroom_req; + /**< Minimum mbuf headroom required by device */ + + uint16_t min_mbuf_tailroom_req; + /**< Minimum mbuf tailroom required by device */ + struct { unsigned max_nb_sessions; /**< Maximum number of sessions supported by device.