From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: Re: [PATCH 1/2] cryptodev: add min headroom and tailroom requirement Date: Thu, 21 Jun 2018 19:54:31 +0530 Message-ID: <7fa289f6-49a7-e3fe-39d6-e37aba7aa0e9@nxp.com> References: <1529389574-6643-1-git-send-email-anoob.joseph@caviumnetworks.com> <1529389574-6643-2-git-send-email-anoob.joseph@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org To: Anoob Joseph , Declan Doherty , Pablo de Lara Return-path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0073.outbound.protection.outlook.com [104.47.2.73]) by dpdk.org (Postfix) with ESMTP id 2C67C1BB5A for ; Thu, 21 Jun 2018 16:24:46 +0200 (CEST) In-Reply-To: <1529389574-6643-2-git-send-email-anoob.joseph@caviumnetworks.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/19/2018 11:56 AM, Anoob Joseph wrote: > 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 > --- > 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. Is this targeted for 18.08 or 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. */