From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id E6178695C for ; Thu, 4 May 2017 09:38:51 +0200 (CEST) Received: from CY1PR03CA0031.namprd03.prod.outlook.com (10.174.128.41) by BY2PR03MB174.namprd03.prod.outlook.com (10.242.36.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12; Thu, 4 May 2017 07:38:48 +0000 Received: from BY2FFO11OLC015.protection.gbl (2a01:111:f400:7c0c::143) by CY1PR03CA0031.outlook.office365.com (2603:10b6:600::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12 via Frontend Transport; Thu, 4 May 2017 07:38:49 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; 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 BY2FFO11OLC015.mail.protection.outlook.com (10.1.15.59) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1047.9 via Frontend Transport; Thu, 4 May 2017 07:38:49 +0000 Received: from [127.0.0.1] (B35197-11.ap.freescale.net [10.232.134.49]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v447ceeK007792; Thu, 4 May 2017 00:38:46 -0700 To: Sergio Gonzalez Monroy , Pablo de Lara , References: <1493402588-163123-1-git-send-email-pablo.de.lara.guarch@intel.com> <46d732a5-3ab0-a63b-bd12-acc9372a3c57@nxp.com> <058e6ed7-9404-1333-31be-c389fe08d246@intel.com> <152e5bc5-26b3-2505-f5b7-842652110641@nxp.com> CC: , , , From: Akhil Goyal Message-ID: Date: Thu, 4 May 2017 13:08:39 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131383571296530388; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39840400002)(39860400002)(39450400003)(39410400002)(39850400002)(39400400002)(39380400002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(377454003)(199003)(24454002)(189002)(9170700003)(31686004)(53936002)(229853002)(47776003)(2906002)(105606002)(8656002)(54906002)(230700001)(4326008)(120886001)(81166006)(561944003)(93886004)(31696002)(8676002)(64126003)(77096006)(104016004)(54356999)(50986999)(76176999)(65956001)(356003)(6246003)(86362001)(65806001)(189998001)(498600001)(85426001)(8936002)(7246003)(4001350100001)(305945005)(7126002)(65826007)(36756003)(83506001)(5660300001)(2950100002)(38730400002)(106466001)(33646002)(53546009)(6666003)(23746002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB174; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC015; 1:+qnTMVq9LfA2mTM+pNM39JgxNPhrDJ6EbZ6VSqMRfqgJ3WSfYm1vA0/te+6IDp5kRWQYWNOd7r73OybpbZXQVhQtYg9h8z49Ykd+s9MwjmDhFGZU5blRrS9Zoh0vCsAxPrGEAxxRi/uIpnsLGVAAKwvzZmOvesa9DhHMEIHEnLeuHDCFl28AcR2vhPk96srxkrvShWT92ISuis2JGXK34qXI0ciF9381jKWk1Ia13rxFHpKKCSuBwenn3orp9rFyVCC79ot0MulQM/QMF3zc6/i2xzd74IU1/WzWBssBAXY/d04HKkA02h7KsUJgAk7O1eewDX46uR3RdEKBb4DdQ15l2VM6TnqJSbt48OVr5mo7peB+dnDafbJXtsCAQGiTEbISUnUHjoGd5Q53iWFUORoCJsfZtTgSgIBjMTdrWZNbhw74b0rd11beltsnv3BHOOpWo22RAcFF4/Bb3gRvsSyAu4+rCMAQqyUqvwWz0kBYL42fTZEinRrx1s3yRj2I3JuuB8DxO8bzYz57IQxVWauh5WPFwj0ZDQGQhH1AvH9K9wJb39qHvKZXnsRU5D+94AmsDCmLs5vcwAibw/32KBOORvhcK0gs4UrSBGuj1JyEkerrJatH+O2qjAqaKzANj9wVaDpjbzI4g25M0c+pZg== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0bed4d73-05f6-43b2-a4e4-08d492c09ad7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY2PR03MB174; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB174; 3:6ozDj8TsBub1bRNl/UHARQqz+1CE3xXyLIpGWxVFceoffO4DgMj+HvNOzsgPgIifMdo04R6dWzae3ape/7/jZcynXRP82koYsQh3okAePGyahnijFFL0+Unb57NL8YAls5o9rSvLFqUywDZIf0S7S5HO15TusrzFUmEWFa83MpXwhrw1qOH6JE0mHqfqJcG1kU1e9lRa4fwjSYBKPBqR36DNeA6YdDxKut3HGwi1csrxW7KpZjXkg6caH5ZsaJV/iuzPAtjHReCkNUbOgSZ2a2kW0pzj8ZzJtLwC4mOoXkUYXR/9kNJGe/AD7CrhGKKJLtgQdwyo0maZc8LLIwz0vDHn9OD/TURxqSlKgetbsEBWu4NjhIO2EmbwJA9fsE4IVFpDZ0RX213DVN3I8F65h4L4u9JFwhwygOMIHYpPckezfnyBBbg926vHRFgGGCFI; 25:FBgMrakYCy80raVuQlmuY+GQrq2u4epAH07aSZwSBWEhCBr7pr8vKP6dcKKEyiWkShntEJ58bGf+77G2sruhOkClaIVCbSRc3tv22aDMvZ0qr0NBeTWjNiax3hWHRe3y0WmBLT8wCX+MpwJ9NvL4g3pFUPuq4vFZkxad26H3oPeFTtme1rjnnmH0mfFUSolOiu/wGVYjGnh8YrFmctvh1dKpWbN0ajjvEjOG+l11yM6002GeJIQdBihCeDAygn5XLUqixZksmlJMjFwJULNAampEyEihFRB2LY5FQIcClaZGUaOTWb9AbtiPv/ZBsD5pMNhvT+TOVAq8SvxgEaVYYTx+SFbRatOmMmT//I/gN6JDf10YJN3GSqV1VUSamQjdadTmEhs2hJLqstpwtZFJK3qRdCeuxVgwdF9w62ceroe/rsQTsSomaPrlyUbYQQGpXoCKWJqAUYIYxb5qy+qwsA== X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB174; 31:jHKlcYzU5BnKhll6udrALogZRrqiTxA5blmpjG4IBxzf6ebeF9hbi/g5EXXb4BqDeMBK+dkCCiG4MDpAaeFUWFp/4Vl4swm/Ku0sA9RPueUaWKaljZkBcjUeDj+Ik6CpRBm3nhOM0/f6LIc2QebOPuSFHwpTpETyO6KT+3+FYHse45Df5Bsx5qxBmHECBbG9E638yilo/JZe+ePf7KU59q+m/fy3U8OwBY9iHvtqmy2IE0N9nnHNoUgQzCyEAV5Hbk3VAOXylQduDxNEIEai+A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(13017025)(5005006)(8121501046)(13024025)(13023025)(13018025)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123556025)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123559100); SRVR:BY2PR03MB174; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB174; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY2PR03MB174; 4:JY92oPamHDk4iJRyoaN2riZszKuiQgt62CUiHgI?= =?Windows-1252?Q?S/mzlo7UxQxxmwkAvNrKBaosTVNxi4wMKLSauNytWDaHgkaiwZgAUeE0?= =?Windows-1252?Q?0PcFeK+8U1EZ0HyaDV0budXoVyMvsCz2FAkSI1vRDdHfRqDWsSpGoohz?= =?Windows-1252?Q?soHrc91ncgaYcT4SQbttWovZK13vDpu+cpzKgK8O+ohjBshrqd44OeKl?= =?Windows-1252?Q?2HXShZIOiXdyHwmeYYVdIod8TmM7Us0NdqXCvnGMoHeirtMxDt/Hznqi?= =?Windows-1252?Q?58zCRj230N5Ekcj8Z3wMto7Lo32BtTthhIvpiF7chyJlwqHOTndwUPAU?= =?Windows-1252?Q?9hAaxiFcK4S9ONnCElKNLY3op+LyWJK69X1r1x0xpWuOLq3VkmhfG2G0?= =?Windows-1252?Q?t/hgWgmIgTCfne60q36kCBxVyqfv8MzIMGqtUjCxGefhxLayOUrCWrmo?= =?Windows-1252?Q?Q+Tt6L9R93CkkOz4CqHRt7TGZlHWnbWiuJZweE8o0qHe/M/HnnFKZpfp?= =?Windows-1252?Q?UZQqKjzx/bQrF8iVbA47501v6h0r4Gy3z3bZCwsH/KWBJv4L2jNyUlRW?= =?Windows-1252?Q?V4wCafo8QLDDdPhzBLH0DMYcNjD+zKe/fTKFkWy/zelVTTwJKaHv5BE5?= =?Windows-1252?Q?qmcezt9dd4Hf7B6kyV2WHtf7++O4rNWEfYgRK3Ar8Q213zcG83kow50i?= =?Windows-1252?Q?DD7dTjhMN2HIQkX1pO7pZsEKxw3BWwFc/x0T15In0DcTJlWOyXsU3+2t?= =?Windows-1252?Q?LQU8ZBxA8IFYAPJNfj63kYjlUlVl3lvctQDSdYNsWUf3CrfxD2ap7E51?= =?Windows-1252?Q?giY7LtNQfcnGpNHxOfKYidt/MHZIqkXOZQCZYiB9ste5Daw9ohBxJzvN?= =?Windows-1252?Q?spZlyHE0xypNLa8fgwuH88SgUANmZfqVMda2qtuD9aun+DCRsbSMe5a9?= =?Windows-1252?Q?NO3CF7H0w2QR4SGdiJ4VMalf0fA+hIjPh6NA8x3aTHK0L9Of7hb+k/FM?= =?Windows-1252?Q?qvSRGnRpnxmEeHOXEvbTICW+danymycfyW8DAi+09Ygxthg=3D=3D?= X-Forefront-PRVS: 02973C87BC X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY2PR03MB174; 23:UeGeGYMFaV0fwkqWTuDXhHvRuI+4elp3LdxVt5?= =?Windows-1252?Q?IezFPJe6zcDrcMmp0DrydFUiKIfdq/lAw8+MMy69W2K+J+yoMVq7ZrfK?= =?Windows-1252?Q?mzKy1vL8+MUSn0EF5vvgLt3cn+0sQ19g50s4B6c0H6KOafdK8l89Sevq?= =?Windows-1252?Q?277GCLvHEepdnkt/NHBFxyHZ8FMAX4Y0PGZY+s+OZQN2xiNwaCCgMqen?= =?Windows-1252?Q?IYYAiADhyD4e1s1CURFPUi4V3OvNghH/QX9JSVE69LFooAPUihBCsvST?= =?Windows-1252?Q?PJDSd2W0Jedv4WBiCN0nDUgXrF3fLHRWSI12h6vr1JpNL0SvBCL1HuBR?= =?Windows-1252?Q?6bdV/KSVyAxp0x1u/2p9uDxaSn6rjC7848FJ12DTJwgDlqP+3a7Qq5Og?= =?Windows-1252?Q?a46yHTRUirvr7KZEEPiBumNhAEJFK3mdj6E7GS7fzR1BVsuKk9rkh4xD?= =?Windows-1252?Q?428bj5RoU/Zs/Ogvcus7o6a1dDsUGmEb2UhD4oXzLRtYqY+b10niMyg8?= =?Windows-1252?Q?NcW3CaWtNZpS+lK6t1dQ7FBEx3891P5/rPPTIZ36Jyg+nPas5ZMX2+Fe?= =?Windows-1252?Q?E3qu2TcFSezc53fValJPjk4Hs6T351cdINatbsGET8LDhfK0kPL35sUL?= =?Windows-1252?Q?icCd62DUutitDeLa3hAkeD5Ywk8bgOnWv/rNHRR2iIag1YjC8fbL9MuV?= =?Windows-1252?Q?fx4lmSwoBsId6v5eYyD7m34T0ohNdJFAQe/yuLjdpV1p7HFRtXZHp846?= =?Windows-1252?Q?RaMtGk26HmPsb+YBTIq30c61gKZntixpOj08nPbn9asHQBpaONl2BNSd?= =?Windows-1252?Q?aAVShzwaAYzPL8xaJiCdVvEeGKUeQPnLgjBVby28Njx6+wT/SCvf/UUT?= =?Windows-1252?Q?c5cc7B4sUj3ViUOAX2Dqshs9sYMPeXBmGBz8B9eTJGhZ7pIyvToPadNv?= =?Windows-1252?Q?rjIA3GsOtbSdELkVsLElaSIB7fJ0a6DafM1gKlStgDktIyeFXfp/ubSu?= =?Windows-1252?Q?/dIZhJ/lFIXvHg0eR54jY4oPeLK+vALu0DqA3ld0l6+fOP9OsyZjE131?= =?Windows-1252?Q?BH3/H9prWfdsdSLtaZ/MQ+v15pjf4olPI1yUcJLg8XtCMN3MFh4BPp2L?= =?Windows-1252?Q?2mDZA04bCw68C5h+UW3vTb1R6KSViky7ZlBM0d9Htos6tnusY+uHUVQq?= =?Windows-1252?Q?iGg2C6b4/uEaKs15TUX/x0vO7dMXp4MDh1cNUYJtM5KzLUqqoZMi/gtC?= =?Windows-1252?Q?REECyW28xFMWCm6zcxpMi34BSEihZIfHTTC4SKYtCKVlAqW5suyvv6at?= =?Windows-1252?Q?ScYvXn7FBVKkndiI6wSHreXul9nGCctK6Xbw13USSrr/u1A3RQWHfQ6A?= =?Windows-1252?Q?lPibhRSjH4X+vfltJu2+sV5fKZRwTXqrnv4TAwvmtrDwO82QzjDs8kt9?= =?Windows-1252?Q?NzhMRhiObFGLhKuECXaAdQX9qv/FniMWhbhIIvtumovxBODsaFLOpVcn?= =?Windows-1252?Q?tRivYlUUYUCwB8wSd0bdX2d78tOERdUpJNoaR/9eWh+RM36zhW7fXsrg?= =?Windows-1252?Q?ufrtuqDL3Ux4VZ79m3jwZFmH92+eiL3D5597wAKaxQvvfJIFVcWDfDEX?= =?Windows-1252?Q?Gosu9C+/zGjrSAE4FoPsvFT/EVVfdHBW5PiRdjQI/XX3hxZ2Ez9z6itm?= =?Windows-1252?Q?wM87qiseqbwaVxbFufWwtTF4p4cBCUfsMdbzzAFhmWI+9zk5zY?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB174; 6:sZmd8OAH6xwzfbPRWHbf+pXUpjdwtBy/hV5PIa+RmZ72cabHiPGY+SJwb2+pwxOWhWXGvZgHuSthOgb2/4wUeYdVaV9MoLqmKw/X9y3GV3iQAVRlR492JohWWhGPIK2uGeCxQLaiHlJtpV8qr7EHUitCXDlOQhC7tP96+CbP2OvY/OG/U0Vu7HRAXvB5aVfPU104dM+VKlNpTNe0+bsm475rNKm4lxFzSDK9jJcRbdPQsc3Bs6uLet4R0o3yE7Id9WgrEiErzs/iFhBP/SPkSVRosdGOTbKBSGpXwJOJDI7MHuSQGtUP9DkHp8aqOwry/zqxLAM4CstqcC147j1FW48PFnB4NqMO14ffcFgj0hWL6VIqMuZuiFhPuy1KMHPHISJpHvjqS7hgY6LP6lbSmY1LTnMhyw4E/E6v3qWRNjObKeSI45nrC6+L4WT9FTIFw3DIMgDLlAanq1/RcJBd6MKe1eCNmvN94JyUPi3LxpUNObuC1n7jUkH73kjf2VTM; 5:aGOrRydryPoNCyaTuMpcigJqs2jhp3PKhWigK5B8K3YPKf4jZE+RbLAu8c2XrRUW/MqCwnKf3iBjUF71Jt7+7kojl0kW06dOblsSPtPaoAkOxtC//FYQBlej7OdHCRSI1dIDoXziVfwJKX3DHerdmY6BPCQCxqNn7dlXbjd6OhMBKyMi5ufWdwSU31PrGuEm; 24:gnesRRIIBYuZO/zYDXXBRrYa5yEpV0N3hjDBL67jcML6TMfp/TkCUlf2iujZPzmCYB9TxPtWR0zVYuwu/i4C/DPLq9+p5dTujv9byouufmM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB174; 7:XDkpi5gytcP3uMo96O1V8vsE3OuCe7JH/OhHHeX5vBw4aJkXfkkj8QBO5Wz88BS/KltyrS7gM1rcJ+qtKMclQCdpWF12bKz+SPnaTG0kbiru2pTHDSQ5fUG384SKdDrbo8kM5mcRrSFu0KiXZWcJrExgcenOO3opgKMJRMwiCVM+jYMTBHZfSjM/nEpb+FN9o2NM8feVgRe0HvWkx2ISnnDTa7/h6ndVC8PT7KLiocOb9sQLCWPrDFifJdmf8ttPdfMWoc+12wfDslH0uo2chVaV93EHIiGmFC+NCYHWoR+Tr8U2+nBDV5XBpuj9JZ34844RQQAAuXHkMjuZUp34dQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2017 07:38:49.2630 (UTC) 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: BY2PR03MB174 Subject: Re: [dpdk-dev] [PATCH] [RFC] cryptodev: crypto operation restructuring 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, 04 May 2017 07:38:52 -0000 On 5/4/2017 1:01 PM, Sergio Gonzalez Monroy wrote: > On 04/05/2017 07:09, Akhil Goyal wrote: >> Hi Sergio, >> >> On 5/3/2017 7:48 PM, Sergio Gonzalez Monroy wrote: >>> On 03/05/2017 12:01, Akhil Goyal wrote: >>>> Hi Pablo, >>>> >>>> On 4/28/2017 11:33 PM, Pablo de Lara wrote: >>>>> This is a proposal to correct and improve the current crypto >>>>> operation (rte_crypto_op) >>>>> and symmetric crypto operation (rte_crypto_sym_op) structures, >>>>> shrinking >>>>> their sizes to fit both structures into two 64-byte cache lines as >>>>> one of the goals. >>>>> >>>>> The following changes are proposed: >>>>> >>>>> In rte_crypto_op: >>>>> >>>>> - Move session type (with session/sessionless) from symmetric op to >>>>> crypto op, >>>>> as this could be used for other types >>>>> >>>>> - Combine operation type, operation status and session type into a >>>>> 64-bit flag (each one taking 1 byte), >>>>> instead of having enums taking 4 bytes each >>>> [Akhil] wouldn't this be a problem? Bit fields create endianness >>>> issues. Can we have uint8_t for each of the field. >>> >>> Sure, as it is proposed it would be the same as having 3 uint8_t fields. >>> The idea was to possibly compact those fields (ie. we do not need 8 bits >>> for sess_type) to make better use of the bits and add asym fields there >>> if needed. >>> >>> I don't think bitfields would be a problem in this case. Agree, we >>> should not use both bitmask and bitfields, but we would use just >>> bitfields. >>> Can you elaborate on the issue you see? >>> >>> Regards, >>> Sergio >>> >> >> The problem will come when we run on systems with different >> endianness. The bit field positioning will be different for LE and BE. >> It would be like in LE >> uint64_t type:8; >> uint64_t status:8; >> uint64_t sess_type:8; >> uint64_t reserved:40; >> >> and on BE it would be >> uint64_t reserved:40; >> uint64_t sess_type:8; >> uint64_t status:8; >> uint64_t type:8; >> >> So it would be better to use uint8_t for each of the field. > > Understood, but why is that an issue? Those fields are used by > application code and PMD, same system. > Do you have a use case where you are offloading crypto ops to a > different arch/system? > > Sergio same application may run on LE or BE machines. So if we use masks for accessing these fields and take the complete field as uint64_t, then LE and BE machine would interpret it differently as the code is same. Akhil > >> >>>>> >>>>> - Remove opaque data from crypto operation, as private data can be >>>>> allocated >>>>> just after the symmetric (or other type) crypto operation >>>>> >>>>> - Modify symmetric operation pointer to zero-array, as the symmetric >>>>> op should be always after the crypto operation >>>>> >>>>> In rte_crypto_sym_xform: >>>>> >>>>> - Remove AAD length from sym_xform (will be taken from operation only) >>>>> >>>>> - Add IV length in sym_xform, so this length will be fixed for all >>>>> the operations in a session >>>> A much needed change. This would remove hard codings for iv length >>>> while configuring sessions. >>>>> >>>>> In rte_crypto_sym_op: >>>>> >>>>> - Separate IV from cipher structure in symmetric crypto operation, as >>>>> it is also used in authentication, for some algorithms >>>>> >>>>> - Remove IV pointer and length from sym crypto op, and leave just the >>>>> offset (from the beginning of the crypto operation), >>>>> as the IV can reside after the crypto operation >>>>> >>>>> - Create union with authentication data and AAD, as these two values >>>>> cannot be used at the same time >>>> [Akhil] Does this mean, in case of AEAD, additional authentication >>>> data and auth data are contiguous as we do not have explicit auth data >>>> offset here. >>>>> >>>>> - Remove digest length from sym crypto op, so this length will be >>>>> fixed for all the operations in a session >>>>> >>>>> - Add zero-array at the end of sym crypto op to be used to get extra >>>>> allocated memory (IV + other user data) >>>>> >>>>> Previous rte_crypto_op (40 bytes) and rte_crypto_sym_op (114 bytes) >>>>> structures: >>>>> >>>>> struct rte_crypto_op { >>>>> enum rte_crypto_op_type type; >>>>> >>>>> enum rte_crypto_op_status status; >>>>> >>>>> struct rte_mempool *mempool; >>>>> >>>>> phys_addr_t phys_addr; >>>>> >>>>> void *opaque_data; >>>>> >>>>> union { >>>>> struct rte_crypto_sym_op *sym; >>>>> }; >>>>> } __rte_cache_aligned; >>>>> >>>>> struct rte_crypto_sym_op { >>>>> struct rte_mbuf *m_src; >>>>> struct rte_mbuf *m_dst; >>>>> >>>>> enum rte_crypto_sym_op_sess_type sess_type; >>>>> >>>>> RTE_STD_C11 >>>>> union { >>>>> struct rte_cryptodev_sym_session *session; >>>>> struct rte_crypto_sym_xform *xform; >>>>> }; >>>>> >>>>> struct { >>>>> struct { >>>>> uint32_t offset; >>>>> uint32_t length; >>>>> } data; >>>>> >>>>> struct { >>>>> uint8_t *data; >>>>> phys_addr_t phys_addr; >>>>> uint16_t length; >>>>> } iv; >>>>> } cipher; >>>>> >>>>> struct { >>>>> struct { >>>>> uint32_t offset; >>>>> uint32_t length; >>>>> } data; >>>>> struct { >>>>> uint8_t *data; >>>>> phys_addr_t phys_addr; >>>>> uint16_t length; >>>>> } digest; /**< Digest parameters */ >>>>> >>>>> struct { >>>>> uint8_t *data; >>>>> phys_addr_t phys_addr; >>>>> uint16_t length; >>>>> } aad; >>>>> >>>>> } auth; >>>>> } __rte_cache_aligned; >>>>> >>>>> New rte_crypto_op (24 bytes) and rte_crypto_sym_op (72 bytes) >>>>> structures: >>>>> >>>>> struct rte_crypto_op { >>>>> uint64_t type: 8; >>>>> uint64_t status: 8; >>>>> uint64_t sess_type: 8; >>>>> >>>>> struct rte_mempool *mempool; >>>>> >>>>> phys_addr_t phys_addr; >>>>> >>>>> RTE_STD_C11 >>>>> union { >>>>> struct rte_crypto_sym_op sym[0]; >>>>> }; >>>>> } __rte_cache_aligned; >>>>> >>>>> struct rte_crypto_sym_op { >>>>> struct rte_mbuf *m_src; >>>>> struct rte_mbuf *m_dst; >>>>> >>>>> RTE_STD_C11 >>>>> union { >>>>> struct rte_cryptodev_sym_session *session; >>>>> struct rte_crypto_sym_xform *xform; >>>>> }; >>>>> >>>>> struct { >>>>> uint8_t offset; >>>>> } iv; >>>>> >>>>> struct { >>>>> union { >>>>> struct { >>>>> uint32_t offset; >>>>> uint32_t length; >>>>> } data; >>>>> struct { >>>>> uint32_t length; >>>>> uint8_t *data; >>>>> phys_addr_t phys_addr; >>>>> } aad; >>>>> }; >>>>> >>>>> struct { >>>>> uint8_t *data; >>>>> phys_addr_t phys_addr; >>>>> } digest; >>>>> >>>>> } auth; >>>>> struct { >>>>> struct { >>>>> uint32_t offset; >>>>> uint32_t length; >>>>> } data; >>>>> >>>>> } cipher; >>>>> >>>>> __extension__ char _private[0]; >>>>> }; >>>>> >>>>> Signed-off-by: Pablo de Lara >>>>> --- >>>> >>>> Comments inline. >>>> >>>> Regards, >>>> Akhil >>>> >>>> >>> >>> >> >> > >