Re: [Ocf-linux-users] ocf-linux-20071215 and openssl speed -engine cryptodev
Brought to you by:
david-m
|
From: David M. <Dav...@se...> - 2008-03-26 00:20:25
|
Jivin Nipper Lee lays it down ... > David, > > I had forgotten to do 'mknod /dev/crypto c 10 70', and so your > suggestion > to use the no-hw option on the Configure line actually fixed the > problem. > > So, "no-hw" combined with "--with-cryptodev" on the config works for me. > Does this make sense ? Well, it does in the sense that it is what I use. You should not need the "no-hw" but the cryptodev support is not 100% correct. It should work either way. > Interestingly, after I have done the 'mknod' it seems that the > '-engine cryptodev' is redundant to openssl, since it performs using the > crypto device > without the -engine parameter. If I 'mv /dev/crypto /dev/crypto-hide', > then I see the > performance change since it is using software. Yes, it will use cryptodev by default, if present. I usually just do: rmmod cryptodev run test modprobe cryptodev Cheers, Davidm > > -----Original Message----- > > From: Nipper Lee > > Sent: Monday, March 24, 2008 10:01 AM > > To: ocf-linux-users > > Subject: RE: [Ocf-linux-users] ocf-linux-20071215 and openssl > > speed -engine cryptodev > > > > David, Thanks for the suggestion. > > > > Results are the same (see below). > > > > If cryptodev is built in, then the code which is attempting > > to load libcryptdev.so is the focus. > > > > Lee > > > > / # openssl speed -evp des -engine cryptodev -elapsed invalid > > engine "cryptodev" > > 703:error:25066067:DSO support routines:DLFCN_LOAD:could not > > load the shared lib > > rary:dso_dlfcn.c:162:filename(/usr/lib/engines/libcryptodev.so > > ): /usr/lib/engine > > s/libcryptodev.so: cannot open shared object file: No such > > file or directory 703:error:25070067:DSO support > > routines:DSO_load:could not load the shared libra > > ry:dso_lib.c:244: > > 703:error:260B6084:engine routines:DYNAMIC_LOAD:dso not > > found:eng_dyn.c:450: > > 703:error:2606A074:engine routines:ENGINE_by_id:no such > > engine:eng_list.c:415:id =cryptodev 703:error:25066067:DSO > > support routines:DLFCN_LOAD:could not load the shared lib > > rary:dso_dlfcn.c:162:filename(libcryptodev.so): > > libcryptodev.so: cannot open sha red object file: No such > > file or directory 703:error:25070067:DSO support > > routines:DSO_load:could not load the shared libra > > ry:dso_lib.c:244: > > 703:error:260B6084:engine routines:DYNAMIC_LOAD:dso not > > found:eng_dyn.c:450: > > You have chosen to measure elapsed time instead of user CPU time. > > To get the most accurate results, try to run this program > > when this computer is idle. > > Doing des-cbc for 3s on 16 size blocks: 1226557 des-cbc's in > > 3.00s Doing des-cbc for 3s on 64 size blocks: 334717 > > des-cbc's in 3.00s Doing des-cbc for 3s on 256 size blocks: > > 87400 des-cbc's in 3.00s Doing des-cbc for 3s on 1024 size > > blocks: 22095 des-cbc's in 3.00s Doing des-cbc for 3s on 2048 > > size blocks: 11068 des-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct > > 2007 built on: Mon Mar 24 09:45:54 CDT 2008 > > options:bn(64,32) md2(int) rc4(ptr,char) > > des(idx,risc1,16,long) aes(partial) ide > > a(int) blowfish(idx) > > compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS > > -D_REENTRANT -DDSO_DLFCN -DH AVE_DLFCN_H -DHAVE_CRYPTODEV > > -DB_ENDIAN -DOPENSSL_NO_HW -DB_ENDIAN -DTERMIO -O3 -Wall > > available timing options: TIMES TIMEB HZ=100 [sysconf value] > > timing function used: ftime The 'numbers' are in 1000s of > > bytes per second processed. > > type 16 bytes 64 bytes 256 bytes 1024 > > bytes 2048 bytes > > des-cbc 6539.46k 7131.12k 7448.20k > > 7531.72k 7545.69k > > / # > > > > > > > > > -----Original Message----- > > > From: David McCullough > > [mailto:Dav...@se...] > > > Sent: Monday, March 24, 2008 7:33 AM > > > To: Nipper Lee > > > Cc: ocf-linux-users > > > Subject: Re: [Ocf-linux-users] ocf-linux-20071215 and openssl > > > speed -engine cryptodev > > > > > > > > > Jivin Nipper Lee lays it down ... > > > > Hello, > > > > > > > > I'm working with the ocf-linux-20071215 release targeting > > hardware > > > > with talitos (FSL SEC) and attempting to get openssl to use the > > > > hardware for acceleration. > > > > > > > > I put ocf into the Linux 2.6.23 kernel and made some > > > compile fixes in > > > > crypto/ocf/talitos.c to get it building. > > > > (I will post patches once they are working.) > > > > > > > > I applied the openssl-0.9.8g.patch to openssl and > > > configured openssl > > > > --with cryptodev and openssl built ok. > > > > > > > > I've hit a snag running openssl and I need a nudge in the right > > > > direction. > > > > > > > > When I run 'openssl speed' referencing the cryptodev engine (see > > > > console output below), there's a missing engines library > > > > (libcryptodev.so). > > > > I'm not sure what software component should provide this library. > > > > > > I normally build it without HW support. I think it gets > > > confused because cryptodev is built in and never loaded as a .so. > > > > > > Add "no-hw" to your config options and see if that helps, > > > > > > Cheers, > > > Davidm > > > > > > > / # openssl speed -evp des -engine cryptodev -elapsed > > > invalid engine > > > > "cryptodev" > > > > 708:error:25066067:DSO support routines:DLFCN_LOAD:could > > > not load the > > > > shared lib > > > > rary:dso_dlfcn.c:162:filename(/usr/lib/engines/libcryptodev.so): > > > > /usr/lib/engine > > > > s/libcryptodev.so: cannot open shared object file: No > > such file or > > > > directory 708:error:25070067:DSO support > > > routines:DSO_load:could not > > > > load the shared libra > > > > ry:dso_lib.c:244: > > > > 708:error:260B6084:engine routines:DYNAMIC_LOAD:dso not > > > > found:eng_dyn.c:450: > > > > 708:error:2606A074:engine routines:ENGINE_by_id:no such > > > > engine:eng_list.c:415:id =cryptodev > > 708:error:25066067:DSO support > > > > routines:DLFCN_LOAD:could not load the shared lib > > > > rary:dso_dlfcn.c:162:filename(libcryptodev.so): libcryptodev.so: > > > > cannot open sha red object file: No such file or directory > > > > 708:error:25070067:DSO support routines:DSO_load:could > > not load the > > > > shared libra > > > > ry:dso_lib.c:244: > > > > 708:error:260B6084:engine routines:DYNAMIC_LOAD:dso not > > > > found:eng_dyn.c:450: > > > > You have chosen to measure elapsed time instead of user CPU time. > > > > To get the most accurate results, try to run this program > > when this > > > > computer is idle. > > > > Doing des-cbc for 3s on 16 size blocks: 1226408 des-cbc's > > in 3.00s > > > > Doing des-cbc for 3s on 64 size blocks: 341066 des-cbc's in 3.00s > > > > Doing des-cbc for 3s on 256 size blocks: 87708 des-cbc's in 3.00s > > > > Doing des-cbc for 3s on 1024 size blocks: 22085 des-cbc's > > in 3.00s > > > > Doing des-cbc for 3s on 2048 size blocks: 11056 des-cbc's > > in 3.00s > > > > OpenSSL 0.9.8g 19 Oct 2007 built on: Fri Mar 21 18:56:03 CDT 2008 > > > > options:bn(64,32) md2(int) rc4(ptr,char) des(idx,risc1,16,long) > > > > aes(partial) ide > > > > a(int) blowfish(idx) > > > > compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT > > > > -DDSO_DLFCN -DH AVE_DLFCN_H -DHAVE_CRYPTODEV -DB_ENDIAN > > -DB_ENDIAN > > > > -DTERMIO -O3 -Wall available timing options: TIMES TIMEB HZ=100 > > > > [sysconf value] timing function used: ftime The 'numbers' > > > are in 1000s > > > > of bytes per second processed. > > > > type 16 bytes 64 bytes 256 bytes 1024 > > > bytes 2048 > > > > bytes > > > > des-cbc 6540.84k 7266.39k 7474.45k 7528.31k > > > > 7537.51k > > > > / # > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > --- This SF.net email is sponsored by: Microsoft Defy all > > > challenges. > > > > Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Ocf-linux-users mailing list > > > > Ocf...@li... > > > > https://lists.sourceforge.net/lists/listinfo/ocf-linux-users > > > > > > > > > > -- > > > David McCullough, dav...@se..., > > > Ph:+61 734352815 > > > Secure Computing - SnapGear http://www.uCdot.org > > > http://www.cyberguard.com > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Ocf-linux-users mailing list > Ocf...@li... > https://lists.sourceforge.net/lists/listinfo/ocf-linux-users > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |