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 <anoob.joseph@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Anoob Joseph 2018-07-10 20:12:37 +05:30 committed by Pablo de Lara
parent 2d349f6034
commit db10602b76
2 changed files with 10 additions and 0 deletions

View File

@ -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:

View File

@ -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.