From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0084.outbound.protection.outlook.com [104.47.37.84]) by dpdk.org (Postfix) with ESMTP id E01F17CD8 for ; Thu, 25 Jan 2018 09:24:59 +0100 (CET) Received: from MWHPR03CA0017.namprd03.prod.outlook.com (2603:10b6:300:117::27) by BY1PR03MB1420.namprd03.prod.outlook.com (2a01:111:e400:5255::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 25 Jan 2018 08:24:58 +0000 Received: from BY2FFO11FD013.protection.gbl (2a01:111:f400:7c0c::167) by MWHPR03CA0017.outlook.office365.com (2603:10b6:300:117::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Thu, 25 Jan 2018 08:24:58 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD013.mail.protection.outlook.com (10.1.14.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Thu, 25 Jan 2018 08:24:57 +0000 Received: from [10.232.134.49] (B35197-11.ap.freescale.net [10.232.134.49]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0P6ge89012681; Wed, 24 Jan 2018 23:42:41 -0700 To: "De Lara Guarch, Pablo" , "Gujjar, Abhinandan S" , "Doherty, Declan" , "Jerin.JacobKollanukkaran@cavium.com" CC: "dev@dpdk.org" , "Vangati, Narender" , "Rao, Nikhil" References: <1516697659-44375-1-git-send-email-abhinandan.gujjar@intel.com> From: Akhil Goyal Message-ID: Date: Thu, 25 Jan 2018 12:12:39 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131613422977826984; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(13464003)(6246003)(23676004)(86362001)(8936002)(107886003)(104016004)(81166006)(81156014)(8676002)(97736004)(77096007)(316002)(85426001)(26005)(47776003)(53546011)(53936002)(59450400001)(305945005)(68736007)(65956001)(65806001)(2486003)(76176011)(230700001)(31686004)(50466002)(356003)(498600001)(5660300001)(2906002)(31696002)(336011)(105606002)(67846002)(2950100002)(4326008)(229853002)(106466001)(83506002)(65826007)(64126003)(36756003)(54906003)(58126008)(2501003)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR03MB1420; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD013; 1:N4u6vDfLWKoybUlskknLUS3SNYgT3IDICGTZpmC9pmE1Y8Pp/apQc++Uup3oqcUUZE3/UFCkdxYxP2dLbaOHvloXnoTlE/ywiEiX3jTWQPfwjmHVmaxTLXqhr3N2m2xK X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac5c3791-d6cb-4ff3-72de-08d563cd1ea3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BY1PR03MB1420; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1420; 3:AC75P1Jc1BdfGhTB2Dy+8o630VqvIsNdi9bv0yjGmsv24B9CcglLN0zwi+SubmLvF2R8ppfI1y3twZxxFZKVfIwY2pSUVlM6ga7++FQ0nRV8supI+MsidkEoalT5mmZgS5b2U+OxYGHgtZnii04/2/aPy7vHLaU5jEB51txUMqAy/WH6UE5dZ6nhK1hMXUwJG5FKXulqmgdaG/bYQONqOAJ5hN8yIDvGTNbEeLYSA+BvSZIzKoYFGod9WtvgXKA6wfdukDLT0uP9YJiLRxvb+0jw2DG6bWXY/Bm/b0ejDfc3GriB/UidMqX/GYlqGuTKL8TwSsG+5Ql3jCxnPOn/kNmRRg34i+DO7RIBMluZ4sU=; 25:/ByL7sDCOBK6+lN+W9LiPlE7OgxBL+rBPoZ+cvSaV+iRDhFpai2yYj4+MyyC/o1GaWoH2/osAvtz0gmzIatx3cMDM0cvCJVAdkGSilwAJutitxOQzXAz2/pM7ABzCDRovuF/SrJCVUqyfnmeFWbtOp6++uWjLxnHivodh0mZ/6iUOdtoXgu0VC7MoJeTXjA/wFzCIzNuJdU3EFe+Q8eIpz+xZ+07/UknDz1QZumYO16vTgMcqt+D5+NEg965tuF/s3/U/Hm4mR+bXLlKeulyFe4lF3FK+bISjiW4CNMRDr0eyKWoR/Xprq1o1OBYvV/ACBeueBqfyoralpWxow/82g== X-MS-TrafficTypeDiagnostic: BY1PR03MB1420: X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1420; 31:vfASiNAWbyWoMEazejIVw2fFYwoRH6ETndUl6ZRK5Eg83Cn9VWvrg0bR9TQ6ZNyGKjykbCmrbM7BG1SeTWCRUkVb3KH6r3tiQZi2/7TShTwIdkcbqcl3ldD9tVPyQ/+V5IEFT86lSOrsoU37P0uYGSz0Zpl6yiRqNX1T9/ub+aaKrqVhsfcYqmtoQ67BWtMq38ViAuXdqLiYTotqVqomK5zl9dzYheVCiL+RXyvo+3Y=; 4:kk7kDVd59yG8dmUzKrtrZubQHUfoj+/gRd16if9Z+0j7SW1knQnZ9czlzxP3k4eMxR3ziYDmah1Uew0E/86X2Gm/hNIThKh7CCrwIbGoy0ty98dS5wg1Uzta9FgO29fGfdLrvhA/DITFvneDeTr5SF2BxVJv2P8LUBHpAlyNlwCdFYv86nsqMUTEy/d905QtEpZ7Fa+al2iV5CjzT6gUxomSJkL4UyK/PJYMEz9ZUHKxnW92ZndpkTHrm9tQgAVhnRlHYS6SzyaDG5lW0L6iulVF6Kesz16VvK+s+xG13frE1Y9R7242T49rYUdIncJD9gmzbA+3M3E6ED3BKtF0P91TAXuUpYWIDP37j2v+ECE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123559100)(20161123556025)(20161123565025)(201708071742011); SRVR:BY1PR03MB1420; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR03MB1420; X-Forefront-PRVS: 0563F2E8B7 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTFQUjAzTUIxNDIwOzIzOmdBNzVlay8zQ0ZZbVB0NHF6QnhtOVdXNDhr?= =?utf-8?B?b1EyclhLU0VldGRXNlNzRHd2T3AybTViMlhvUjdQMCt4Q2luRWt5ZC8zRnly?= =?utf-8?B?eFlLbWU4WXdTa3NHaUc1MEl2TTVNbGlxeS90Si8wZnQyRFQ0M3NPUVBVR3BV?= =?utf-8?B?NllteDhqTXB6YlRrMkpSVEcxbnk2eE51aHVPRGJIZkJqYnZzWEFmSnEzV3ZN?= =?utf-8?B?b01jWWlzNms3NnhoeXBMcG9zM29UeWlGUEkr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c3/qqksdeT9m3PBzCb4uTQZrGtwNj6BMjwN41wkSJs1vLx/aBbBgK+TossWWkR4loi051zdfqUbuDh6AZG7e0xxEO6lRva/yD4rM0b+6XajWc3va6K/TFtr8puSOeJrKURG0ZPP1qQqqH5DXzcP1n2Wqqc9oHQ=; 5:4EaeQpSfgO78wrIEcliD/BIDIPGYRc7YGESgWgdS1Heg/E9009w3o1KK2vbNaGsVwydthSBcHJi2hy9AjW3b/cJd0Q4GIyUQ6ey06KNbAHFPgyute2wTUTqJPQQ1gYUwG7F0umOTYdiyi4pmp7285IxhDNFztDFDrUMbQvOGVRs=; 24:ueSRGrvKROW1t+cDlRQKo0jybJ/YxFtLub4KmDtizSC6yJAZcnM3/jsPqo48PybRSmj7f3Y5krTxZDv41mBhsR5eH+qqnUAcFzi3WseE+e0=; 7:SSoUvjl1ICjEE11Kx8jYe9MaCKKeU0VOs6mPbIXbMuuRPc+DBFN1SCjQ/Lj4Shx6nnUsRE8bZjxl66iJQVYVQOw5UDgdijBk5WPwCv07jspZedEUYiIs1yP0An68V80rd6aCJlNYRsGzn7/J7OQ8O7b1bdOqV3D4uuSszqNpoPwZ/op9qYEhidYjCxL/+KuAp2KsL0BEhcuaLNf8yoxiUSmSpCWcxPsRKMaCwtxhjcsHe1512YxLOtLw7kzB1wze SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2018 08:24:57.0026 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac5c3791-d6cb-4ff3-72de-08d563cd1ea3 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1420 Subject: Re: [dpdk-dev] [RFC v2, 1/2] cryptodev: add support to set session private data 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, 25 Jan 2018 08:25:00 -0000 On 1/25/2018 1:16 AM, De Lara Guarch, Pablo wrote: > > >> -----Original Message----- >> From: Gujjar, Abhinandan S >> Sent: Tuesday, January 23, 2018 8:54 AM >> To: Doherty, Declan ; akhil.goyal@nxp.com; De >> Lara Guarch, Pablo ; >> Jerin.JacobKollanukkaran@cavium.com >> Cc: dev@dpdk.org; Vangati, Narender ; >> Gujjar, Abhinandan S ; Rao, Nikhil >> >> Subject: [RFC v2, 1/2] cryptodev: add support to set session private data >> >> Update rte_crypto_op to indicate private data offset. >> >> The application may want to store private data along with the >> rte_cryptodev that is transparent to the rte_cryptodev layer. >> For e.g., If an eventdev based application is submitting a >> rte_cryptodev_sym_session operation and wants to indicate event >> information required to construct a new event that will be enqueued to >> eventdev after completion of the rte_cryptodev_sym_session operation. >> This patch provides a mechanism for the application to associate this >> information with the rte_cryptodev_sym_session session. >> The application can set the private data using >> rte_cryptodev_sym_session_set_private_data() and retrieve it using >> rte_cryptodev_sym_session_get_private_data(). > > Hi Abhinandan, > >> >> Signed-off-by: Abhinandan Gujjar >> Signed-off-by: Nikhil Rao >> --- >> Notes: >> V2: >> 1. Removed enum rte_crypto_op_private_data_type >> 2. Corrected formatting >> >> lib/librte_cryptodev/rte_crypto.h | 8 ++++++-- >> lib/librte_cryptodev/rte_cryptodev.h | 32 >> ++++++++++++++++++++++++++++++++ >> 2 files changed, 38 insertions(+), 2 deletions(-) >> >> diff --git a/lib/librte_cryptodev/rte_crypto.h >> b/lib/librte_cryptodev/rte_crypto.h >> index 95cf861..14c87c8 100644 >> --- a/lib/librte_cryptodev/rte_crypto.h >> +++ b/lib/librte_cryptodev/rte_crypto.h >> @@ -84,8 +84,12 @@ struct rte_crypto_op { >> */ >> uint8_t sess_type; >> /**< operation session type */ >> - >> - uint8_t reserved[5]; >> + uint16_t private_data_offset; >> + /**< Offset to indicate start of private data (if any). The private >> + * data may be used by the application to store information which >> + * should remain untouched in the library/driver > > Is this the offset for the private data after the crypto operation? > From your title, it looks like it is for the session private data, but then, this shouldn't be here. > If it is for the crypto operation, I suggest you to separate it in another patch. > Also, you should indicate where the offset starts from. For the IV, the offset is counted > from the start of the rte_crypto_op, so I think it should be the same, to keep consistency. > > For the session private data, we see two options: > > 1 - Add a "valid" private data field in the rte_cryptodev_sym_session structure, > so when it is set, it indicates that the session contains private data > (a single bit would be enough, 1 to indicate there is, and 0 to indicate there is not). > This would go into the beginning of the structure, so this would require an ABI deprecation notice. > This also assumes that the private data starts just after the session header > > 2 - Do not add an extra "valid" private data field in rte_cryptodev_sym_session structure, > and add a small header in the private data, which contains the "valid" bit. > Then, when calling sym_session_get_private_data, this bit should be checked. > Note that the object that holds the session structure needs to be big enough to hold this value. > If the object has only space for the sess_private_data array, then the session has no private data. > Therefore, this approach might be less performant, but with no ABI deprecation required. > > I would recommend you to send a deprecation notice for option 1, then check the performance of both option, > and if needed, make the change in the structure, in 18.05. > > Regards, > Pablo > My thoughts are also inline with Pablo. -Akhil