Re: [Ocf-linux-users] hardware acceleration question
Brought to you by:
david-m
|
From: David M. <Dav...@se...> - 2009-05-13 10:41:47
|
Jivin Max lays it down ... > Thank you for support David. > > I successfully moved driver aes-7108 to ocf-linux-20060331 and build > appropriate crypto-tools. Is the license on the aes-7108 driver suitable for inclusion into OCF proper ? I'd be happy to help with updating it to the latest if it is. > It's loaded ok: > > ~ # dmesg|grep 71 > Peripheral DMA: Chip 0x7108 > cypher_7108_crypto_init(8011670c) > 7108: AES @ 0xbb500100 (0x1b500100 phys) CTR mode > > but openssl still failed to recognize it: > > ~ # openssl engine > Hardware > cryptodev RSA > cryptodev DSA > cryptodev DH > eng_cryptodev.c:1334 CIOCASYMFEAT - failure The error is ok, its just the public key bits failing. > (cryptodev) BSD cryptodev engine > (dynamic) Dynamic engine loading support > > However cryptodev itself is present and usable: > > ~ # openssl speed -elapsed -evp aes128 -engine cryptodev -cpu > Hardware > cryptodev RSA > cryptodev DSA > cryptodev DH > eng_cryptodev.c:1334 CIOCASYMFEAT - failure > engine "cryptodev" set. > ... > OpenSSL 0.9.8g 19 Oct 2007 > built on: Thu Apr 30 13:25:14 NOVST 2009 > options:bn(64,32) rc4(idx,int) des(idx,risc2,16,long) aes(partial) > blowfish(idx) > compiler: mipsel-linux-gnu-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS > -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN > -I/home/x/pmc/linux-2.6.12-rc2-wis/include -DHAVE_CRYPTODEV -D__linux__ > -DTERMIO -O3 -fomit-frame-pointer -Wall > ... > > It looks like ocf driver aes-7108 is not used at all. > > When I'm trying to run > > ~ # cryptotest -v > cipher 3des keylen 24 > CIOCGSESSION: Invalid argument >From the name of the driver I am guessing it only does AES ? If so try: cryptotest -a aes > /dev/crypto disappear with no erros in dmesg. That sounds like a bug from a long time ago. It would be fixed in a later version of ocf. Using the current version would be ideal, but it will require changes to the aes-7108 driver. > After this > > ~ # openssl engine > ENGINE_load: failed to load cryptodev > ENGINE_load: failed to load cryptodev > (dynamic) Dynamic engine loading support > > failed to find it. > > I'll try to have a closer look at driver's source code and crypto-tools > but right now it looks like there is either something wrong with ocf and > \or driver (when called by cryptotest) or openssl (which fails to call > it). > > Any hints on what could be done next would be greatly appreciated. I can generate you some patches which have some fixes in there, but the only way to have all the known problems fixed is to move to the newest version availble. I have attached one which should fix the /dev/crypto problem under 2.6 without changing too much other stuff (ie., you should not have to change you driver). Anything after this needs the driver to move to a new API. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 McAfee - SnapGear http://www.snapgear.com http://www.uCdot.org |