From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id CF9D11B56F for ; Tue, 26 Jun 2018 12:13:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 03:13:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="49975658" Received: from dwdohert-mobl.ger.corp.intel.com (HELO [10.252.27.215]) ([10.252.27.215]) by fmsmga007.fm.intel.com with ESMTP; 26 Jun 2018 03:12:58 -0700 To: Anoob Joseph , Pablo de Lara Cc: Akhil Goyal , Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org References: <1529389574-6643-1-git-send-email-anoob.joseph@caviumnetworks.com> <1529389574-6643-2-git-send-email-anoob.joseph@caviumnetworks.com> From: "Doherty, Declan" Message-ID: Date: Tue, 26 Jun 2018 11:12:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1529389574-6643-2-git-send-email-anoob.joseph@caviumnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] cryptodev: add min headroom and tailroom requirement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 10:13:03 -0000 On 19/06/2018 7:26 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 How is this done for NET PMDs, I don't see anything explicit in the ehtdev API for specification of headroom requirements. > 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. > Is there any variations in requirements for terms headroom/tailroom on a per algorithmic basis or is it purely for the device? > 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. > 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. */ >