From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0062.outbound.protection.outlook.com [104.47.37.62]) by dpdk.org (Postfix) with ESMTP id AA263532C for ; Thu, 28 Jun 2018 04:57:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AW5GRNtWq6Dhsjuzfwhvtv5qFdCdNyewG6VuLDQPjHU=; b=ZE4DVRoGW/kUmuNh+f7umvvM5nejDqeYuN7qx0yZ9ISZE28DCEAnCcQwoYaYEDPNPQLNjt+F4Z4B9RjSr7iDlWE0zR63Wr18k2GVoUVpkmyST2I4f10i9cPls6oiV1u89sAGDS2JNNpAKj7lfm7xhYtjDhgZGx/IeL5ec3bumTU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from [IPv6:2405:204:d40a:bcca:4dc1:3116:d07a:f52e] (2405:204:d40a:bcca:4dc1:3116:d07a:f52e) by SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.20; Thu, 28 Jun 2018 02:56:27 +0000 To: "Doherty, Declan" , 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: "Joseph, Anoob" Message-ID: Date: Thu, 28 Jun 2018 08:26:13 +0530 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2405:204:d40a:bcca:4dc1:3116:d07a:f52e] X-ClientProxiedBy: PN1PR0101CA0016.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::26) To SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3744bff-303a-4add-fb19-08d5dca2c162 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4910; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4910; 3:JLpl5pj4zLnMlwLxu9rP75JKgDVi7+iuirW5Xg8wZYJdsqlFsbNWSPyaWzSW8CTeshf9elmy+lXO5pqvJ3BoLVXOlz7Fu34yAs8N/0u0DFxyzWLV2XR19j+dZ/3FKzPPe2Kgtp4I9KIxshvK/EV5fvkVDDyouhULVjivm/i3+VvqgtemBM/Gg1F4vMc1k0IuPmGvMyAumQ2qXkarcO51+o56a0h0JlD+1fy4IvS9MwvIzfkaJPr9zF9WNegksXS+; 25:kOjEWEHd8ZT9E/bepp+PQjk8Z68p+8vE2sxz+5EyhTBaikxCRxnu4CB9JUtmfGYKSaeArug7bl+VlY5q8D3sC0QtP5bX0CfC/34OqMHpD8WuSWLUavn8LT73nGMf89CZCXv2yLly2s/svUpSduxSQFdnjrN9VArko5oozfvsGUsfDdVGefBkF4ahnAXPIEzdSDX6/7XcTgSlcZMCn3FzVYjADam1gB7O/qxTJbO+9kovxH3ipmmr7/hT2Y1d7dhcuxoezw30462EJSmcqmrHFI3Crs6wFQJ9pujp8Il+d7e3mP0tBJjNMTxRIn10uyEJVB16fQ1SbG7DmJrEQsC3qw==; 31:0qetkyM8VRmX6ky0z+1g+Tap8Rvac/W8EteZWmhtmLY5fkCn2fatMkeWTIXp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TPGMAbpVvQ/c2Ua8wzbA2n8y4X95FyOVEyQ+JwSNLEtpvQUsdkIstztb+/LkY4byHcA5gYxekwvSG39dS71gT/zhDRglhf5XTasi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:SN6PR07MB4910; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4910; X-Forefront-PRVS: 0717E25089 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(136003)(346002)(366004)(376002)(52164004)(189003)(199004)(52146003)(2486003)(23676004)(31686004)(42882007)(53546011)(76176011)(16526019)(386003)(186003)(97736004)(46003)(65826007)(36756003)(50466002)(1706002)(5660300001)(67846002)(72206003)(229853002)(54906003)(6666003)(58126008)(6486002)(52396003)(52116002)(316002)(110136005)(47776003)(65806001)(6116002)(106356001)(105586002)(7736002)(478600001)(53936002)(305945005)(6306002)(2906002)(476003)(966005)(65956001)(8676002)(64126003)(486006)(68736007)(2870700001)(11346002)(8936002)(3260700006)(25786009)(31696002)(446003)(4326008)(81156014)(81166006)(2616005)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4910; H:[IPv6:2405:204:d40a:bcca:4dc1:3116:d07a:f52e]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjZQUjA3TUI0OTEwOzIzOm5QOUtJYUIwY1dEQ3dDTVVjR3pBMGdDVzIr?= =?ut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JoypDxuwWkoFDom/yP7TeKCFErg0XtiI5A==; 5:J4UAiCRooy/Un1cQ4J/lSG2RL1rjXWDB/K6Oe9CTNXuAvNCThXenL1QndBtcrgZyBDmrDK8v+eu+nUuLx9B25wd2MgIaia3wwqY//3JSpUaS2WZwhpS/fvOrl/BPM9rSELAemtqY55fRCsBhF18HHDMtumNimcuRWU6hOGaMJRs=; 24:1pPtUvSqT4rYq29vCnFTya/e5+nWoZ63j+trWEZpPLVHXwLm7aauylyP8Iz5KKznfMScajdGGUuq+p8QZjkCozkmLIQuPJ/MmsAAyLjz/qY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4910; 7:oYcHXg8ODM7dCkeFhfqOsdspjamuazWG8KNbYRIXKvh0Rs551L1bBQ9428qI2nFnPnnaY+phDLSAieAjYoT2QaRqNvDGRyoVkC+cukflEpDDXlDSvIxU87bDOKrQT+3+xkL0rdXbcGFlzeH0QYunRpfluM8CJ0SgTyw0FLg4G3rFCjOsTrO83O2x0E7hB5h5MXmF76RIb3EtvhPSCt0013Z53/5gaFfg2BIaX2hNPU/z33B+6yRikN5iiiwXB1sU X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2018 02:56:27.6646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3744bff-303a-4add-fb19-08d5dca2c162 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4910 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: Thu, 28 Jun 2018 02:57:54 -0000 Hi Declan, Please see inline. Thanks, Anoob On 26-06-2018 15:42, Doherty, Declan wrote: > External Email > > 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. In rte_mbuf.h, the minimum size required for packets involved in rx/tx is specified and that considers headroom also. Applications usually use these default macros while creating mbufs which are involved in rx/tx. https://git.dpdk.org/dpdk/tree/lib/librte_mbuf/rte_mbuf.h#n411 > >> 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? It is purely per device basis. The device can specify upper bounds for the head/tailroom. A device that even specified the room, may not even use the entire room in all cases. So it doesn't have to be algo specific. > >> 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. */ >> >