From: "Loc Ho" Subject: [PATCH 1/3] [CRYPTO] hash: Add Async Hash Support Date: Tue, 13 May 2008 13:27:27 -0700 Message-ID: <0CA0A16855646F4FA96D25A158E299D60472077B@SDCEXCHANGE01.ad.amcc.com> References: <20080118230721.GA30470@Chamillionaire.breakpoint.cc> <002301c85c96$32a67a40$5c05420a@amcc.com> <20080122231818.GB6920@Chamillionaire.breakpoint.cc> <002d01c85d66$11e1d7c0$5c05420a@amcc.com> <004601c85ecd$1eb53d80$5c05420a@amcc.com> <004a01c85efc$56f2ee70$5c05420a@amcc.com> <20080313114230.GC8393@gondor.apana.org.au> <0CA0A16855646F4FA96D25A158E299D6044D6442@SDCEXCHANGE01.ad.amcc.com> <20080422111635.GA19543@gondor.apana.org.au> <0CA0A16855646F4FA96D25A158E299D6045B3153@SDCEXCHANGE01.ad.amcc.com> <20080507130047.GA26872@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C8B537.D052047E" Cc: To: "Herbert Xu" Return-path: Received: from sdcmail02-ext1.amcc.com ([198.137.200.73]:17166 "EHLO sdcmail02.amcc.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764699AbYEMU1v (ORCPT ); Tue, 13 May 2008 16:27:51 -0400 Content-class: urn:content-classes:message In-Reply-To: <20080507130047.GA26872@gondor.apana.org.au> Sender: linux-crypto-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C8B537.D052047E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Patch 1/3 attached. I still can't get the line wrap problem solved. Therefore it is attached instead inline. Please note: 1. ahash_request has an extra variable 'void *info' for future uses with KASUMI 2. Any particular reason for removing ahash_nosetkey from function crypto_init_ahash_ops - This would be an error check for digest if some caller called setkey function for digest algorithm. -Loc=20 -----Original Message----- From: Herbert Xu [mailto:herbert@gondor.apana.org.au]=20 Sent: Wednesday, May 07, 2008 6:01 AM To: Loc Ho Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH 1/1] CryptoAPI: Add Async Hash Support On Tue, Apr 22, 2008 at 10:23:23AM -0700, Loc Ho wrote: >=20 > They are attached instead inline until I figure out how to not wrap long > line. Thanks. I've finally finished testing and integrating it. I've merged them into one patch and dropped unrelated white-space changes. You can resubmit those in a separate patch. Could you please recheck this and if everything looks OK then send it to me again with a sign-off? Oh and if you don't mind please split the tcrypt and cryptd parts into separate patches since they're conceptually distinct from the API bits. Finally a proper description before each patch would be nice :) Thanks, --=20 Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ------_=_NextPart_001_01C8B537.D052047E Content-Type: application/octet-stream; name="0001-CRYPTO-hash-Add-asynchronous-hash-support.patch" Content-Transfer-Encoding: base64 Content-Description: 0001-CRYPTO-hash-Add-asynchronous-hash-support.patch Content-Disposition: attachment; filename="0001-CRYPTO-hash-Add-asynchronous-hash-support.patch" RnJvbSA0OThmYTk5YzYxNzNiMzczYjljNGQ4YTZjNzAyZWZhNzU2NjI1OGMyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMb2MgSG8gPGxob0BhbWNjLmNvbT4KRGF0ZTogVHVlLCAxMyBN YXkgMjAwOCAxMzowMjo0OCAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIFtDUllQVE9dIGhhc2g6IEFk ZCBhc3luY2hyb25vdXMgaGFzaCBzdXBwb3J0CgpUaGlzIHBhdGNoIGFkZHMgYXN5bmNocm9ub3Vz IGhhc2ggYW5kIGRpZ2VzdCBzdXBwb3J0LgoKU2lnbmVkLW9mZi1ieTogTG9jIEhvIDxsaG9AYW1j Yy5jb20+Ci0tLQogY3J5cHRvL01ha2VmaWxlICAgICAgICAgfCAgICAxICsKIGNyeXB0by9haGFz aC5jICAgICAgICAgIHwgIDEwNiArKysrKysrKysrKysrKysrKysrKysrKysrKwogY3J5cHRvL2Fw aS5jICAgICAgICAgICAgfCAgICA4ICsrLQogY3J5cHRvL2RpZ2VzdC5jICAgICAgICAgfCAgIDgx ICsrKysrKysrKysrKysrKysrKysrCiBjcnlwdG8vaGFzaC5jICAgICAgICAgICB8ICAxMDIgKysr KysrKysrKysrKysrKysrKysrKystLQogY3J5cHRvL2ludGVybmFsLmggICAgICAgfCAgICAxICsK IGluY2x1ZGUvY3J5cHRvL2FsZ2FwaS5oIHwgICAzNiArKysrKysrKysKIGluY2x1ZGUvbGludXgv Y3J5cHRvLmggIHwgIDE4NyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrLQogOCBmaWxlcyBjaGFuZ2VkLCA1MDcgaW5zZXJ0aW9ucygrKSwgMTUgZGVsZXRpb25z KC0pCiBjcmVhdGUgbW9kZSAxMDA2NDQgY3J5cHRvL2FoYXNoLmMKCmRpZmYgLS1naXQgYS9jcnlw dG8vTWFrZWZpbGUgYi9jcnlwdG8vTWFrZWZpbGUKaW5kZXggODA3NjU2Yi4uZDRmM2VkOCAxMDA2 NDQKLS0tIGEvY3J5cHRvL01ha2VmaWxlCisrKyBiL2NyeXB0by9NYWtlZmlsZQpAQCAtMTksNiAr MTksNyBAQCBvYmotJChDT05GSUdfQ1JZUFRPX0JMS0NJUEhFUikgKz0gY3J5cHRvX2Jsa2NpcGhl ci5vCiBvYmotJChDT05GSUdfQ1JZUFRPX1NFUUlWKSArPSBzZXFpdi5vCiAKIGNyeXB0b19oYXNo LW9ianMgOj0gaGFzaC5vCitjcnlwdG9faGFzaC1vYmpzICs9IGFoYXNoLm8KIG9iai0kKENPTkZJ R19DUllQVE9fSEFTSCkgKz0gY3J5cHRvX2hhc2gubwogCiBvYmotJChDT05GSUdfQ1JZUFRPX01B TkFHRVIpICs9IGNyeXB0b21nci5vCmRpZmYgLS1naXQgYS9jcnlwdG8vYWhhc2guYyBiL2NyeXB0 by9haGFzaC5jCm5ldyBmaWxlIG1vZG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