ocf-linux-users Mailing List for Open Cryptographic Framework for Linux (Page 23)
Brought to you by:
david-m
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(39) |
Oct
(16) |
Nov
(7) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(10) |
Feb
(1) |
Mar
(18) |
Apr
(8) |
May
(14) |
Jun
(12) |
Jul
(35) |
Aug
(11) |
Sep
(3) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
2009 |
Jan
(20) |
Feb
(12) |
Mar
(31) |
Apr
(20) |
May
(31) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(11) |
Oct
|
Nov
(2) |
Dec
(6) |
2010 |
Jan
(20) |
Feb
(10) |
Mar
(16) |
Apr
|
May
(17) |
Jun
|
Jul
(2) |
Aug
(30) |
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
(6) |
May
(20) |
Jun
(2) |
Jul
(13) |
Aug
(4) |
Sep
(7) |
Oct
(9) |
Nov
(5) |
Dec
(2) |
2012 |
Jan
(5) |
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(19) |
2013 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
From: Tomasz R. <tro...@pr...> - 2007-10-24 07:41:09
|
Hi David, > Jivin Tomasz Rostanski lays it down ... >> Hi David, >>> Jivin Tomasz Rostanski lays it down ... >>>> Hi David, >>>> >>>> Do you made any progress? >>> Yep, sorry for the delay, just ran it up on 2.6.23 using CSR2.4 and >>> ocf. Seems to be ok. Haven't tried ipsec yet, but openssl speed >>> works fine (although throughput seems to be down). >>> >>> The driver is at least processing requests ok. >>> >>> Are you installing the correct NPE code with something like: >>> >>> cat /etc/IxNpeMicrocode.dat >/dev/ixNpe >> I have NPE code compiled in. I have also made a build without compiling >> it in, the result was the same. > > We have an updated patch for CSR-2.4 at: > > http://www.snapgear.org/snapgear/downloads.html > > might be something in there that helps you. I am effectively running SG > Linux 3.5 on my IXP425's with that access lib patch applied, I have imported this patch (not everything I need) to our trunk and checked with the OCF 20070727 and... is working! Thank you for your help. Tomasz |
From: David M. <Dav...@se...> - 2007-10-23 22:10:49
|
Jivin Tomasz Rostanski lays it down ... > Hi David, > >Jivin Tomasz Rostanski lays it down ... > >>Hi David, > >> > >>Do you made any progress? > > > >Yep, sorry for the delay, just ran it up on 2.6.23 using CSR2.4 and > >ocf. Seems to be ok. Haven't tried ipsec yet, but openssl speed > >works fine (although throughput seems to be down). > > > >The driver is at least processing requests ok. > > > >Are you installing the correct NPE code with something like: > > > > cat /etc/IxNpeMicrocode.dat >/dev/ixNpe > > I have NPE code compiled in. I have also made a build without compiling > it in, the result was the same. We have an updated patch for CSR-2.4 at: http://www.snapgear.org/snapgear/downloads.html might be something in there that helps you. I am effectively running SG Linux 3.5 on my IXP425's with that access lib patch applied, Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Tomasz R. <tro...@pr...> - 2007-10-19 06:28:24
|
Hi David, > Jivin Tomasz Rostanski lays it down ... >> Hi David, >> >> Do you made any progress? > > Yep, sorry for the delay, just ran it up on 2.6.23 using CSR2.4 and > ocf. Seems to be ok. Haven't tried ipsec yet, but openssl speed > works fine (although throughput seems to be down). > > The driver is at least processing requests ok. > > Are you installing the correct NPE code with something like: > > cat /etc/IxNpeMicrocode.dat >/dev/ixNpe I have NPE code compiled in. I have also made a build without compiling it in, the result was the same. Tomasz >>> -----Wiadomość oryginalna----- >>>> Od: David McCullough [mailto:Dav...@se...] >>>> Wysłano: Pt 2007-09-28 15:25 >>>> Do: Rostanski, Tomasz >>>> DW: ocf...@li... >>>> Temat: Re: OCF's ixp4xx freeze on 2.6.18-rt7 >>>> >>>> >>>> Jivin Tomasz Rostanski lays it down ... >>>>>> David, >>>>>> >>>>>>>> The latest I can try with easily is 2.3. Do you have that ? >>>>>> We've been using version 2.3 but the OCF wasn't working too. >> Some time >>>>>> ago we have moved to the version 2.4 because we have found it >> working >>>>>> faster that the 2.3 (or maybe I have configured it better). >>>> :-) >>>> >>>>>> I know the version 3.0 is released so I would like to try it >> too. It >>>>>> should have the ethernet driver written better, so perhaps >> someday I >>>>>> would need to go to 3.0. >>>> Check the release notes for 3.0, ixp42x has been dropped, ixp43x and >>>> ixp46x are still supported. Looks like 2.4 is the last for the >>>> ixp420/425. >>>> >>>>>>>> I believe we have 2.4 going into our tree very soon now (week >> or so) >>>>>>>> so I can try it then. >>>>>> Ok, so please let me know how would it work then. >>>> Once it's in I'll let you know, >>>> >>>> Cheers, >>>> Davidm >>>> >>>>>>>>>> David McCullough pisze: >>>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>> >>>>>>>>>>>>>> It seems that the crypto_done is never been called, so >> the loop is >>>>>>>>>>>>>> waiting infinitive and the device freezes. >>>>>>>>>>>>>> So it definitelly could as you have described. However I >> have checked >>>>>>>>>>>>>> the function ixCryptoAccAuthCryptPerform to see if it >> has changed >>>> since >>>>>>>>>>>>>> 2.0 version of the library but is exactly the same. >>>>>>>>>>>>>> I'll try to find what are the differences in crypto part >> of the >>>> library >>>>>>>>>>>>>> - maybe there I will find the clue. >>>>>>>>>>>> Lets hope. We have 2.1 running here (not sure if thats in >> your tree or >>>>>>>>>>>> not). It seems to be behaving so far. Mostly IXP465 >> testing though. >>>>>>>>>>>>>> btw. The ixpCryptoAccCtxRegister failed 6 error I got >> when I tried to >>>>>>>>>>>>>> run this on another board - I have returned to my >> current one ;) >>>>>>>>>>>> Ok, best I can tell, 6 = ALG unsupported, which doesn't >> really make >>>>>>>>>>>> sense, but perhaps that helps you. You can find the enum >> (grrr enum >>>>>>>>>>>> errors) in: >>>>>>>>>>>> >>>>>>>>>>>> ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> Davidm >>>>>>>>>>>> >>>>>>>>>>>>>> David McCullough wrote: >>>>>>>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I have debug the code a bit and found where the >> freeze is. >>>>>>>>>>>>>>>>>> The waiting code in cryptodev_op is never ending >> from the while >>>> loop: >>>>>>>>>>>>>>>>>> do { >>>>>>>>>>>>>>>>>> wait_event_interruptible(...); >>>>>>>>>>>>>>>>>> } while ((crp->crp_flags & CRYPTO_F_DONE) == 0); >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> When I set the rp->crp_flags to CRYPTO_F_DONE in >> ixp_q_process >>>> before >>>>>>>>>>>>>>>>>> return when status equals to >> IX_CRYPTO_ACC_STATUS_SUCCESS the freeze >>>>>>>>>>>>>>>>>> is not happening. >>>>>>>>>>>>>>>>>> So maybe there is something is wrong with >> wait_event_interruptible >>>>>>>>>>>>>>>>>> function in my kernel or I don't know. >>>>>>>>>>>>>>>> We have seen something like this just recently. A >> hash of a 0 length >>>>>>>>>>>>>>>> buffer would cause an error and the access lib would >> not report it, >>>> or >>>>>>>>>>>>>>>> call the callback. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Any chance you are doing something like this ? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Setting CRYPTO_F_DONE in ixp_q_process when you get a >>>>>>>>>>>>>>>> IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be >> returning >>>> before >>>>>>>>>>>>>>>> the operation is completed. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> CRYPTO_F_DONE is set by the call to crypto_done, >> which happens on >>>>>>>>>>>>>>>> error >>>>>>>>>>>>>>>> or when the callback occurs. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am guessing you are past this error as well: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "ixpCryptoAccCtxRegister failed 6" >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> Davidm >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> David McCullough napisa?(a): >>>>>>>>>>>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>> I have checked the latest ixp400 access lib >> (2.4) and ixp_400 >>>>>>>>>>>>>>>>>>>>>>>>>> ethernet driver (1.7). I didn't use the >> Intel patches for crypto >>>>>>>>>>>>>>>>>>>>>>>>>> initialization in ixp400_eth. >>>>>>>>>>>>>>>>>>>>>>>>>> The result is still the same - the device >> freezes when I run >>>>>>>>>>>>>>>>>>>>>>>>>> openssl or ssh. >>>>>>>>>>>>>>>>>>>>>>>>>> I'm having microcode compiled in driver - >> load it from file to >>>>>>>>>>>>>>>>>>>>>>>>>> /dev/ixNpe, so I have recompiled it and load >> the microcode from >>>>>>>>>>>>>>>>>>>>>>>>>> file but this didn't make any difference. >>>>>>>>>>>>>>>>>>>>>>>> Are you using the "crypto version" of the >> access library ? >>>>>>>>>>>>>>>>>>>>>> Yes, I'm using the crypto version of the library. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>> Could this issue be related with the >> hardware? I'm using the >>>>>>>>>>>>>>>>>>>>>>>>>> AirTegrity box which was designed completely >> by them and not >>>> uses >>>>>>>>>>>>>>>>>>>>>>>>>> redboot bootloader but their own one. Could >> it be the reason of >>>>>>>>>>>>>>>>>>>>>>>>>> the problem I'm having? >>>>>>>>>>>>>>>>>>>>>>>> No, we do the same, it has no bearing on how >> the NPE's do their >>>>>>>>>>>>>>>>>>>>>>>> thing. >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> Are you loading the correct NPE code (with >> crypto support etc). >>>>>>>>>>>>>>>>>>>>>> Normally I have NPE code compiled in the >> sources. I'm using the >>>>>>>>>>>>>>>>>>>>>> version with crypto support so it should be ok. >>>>>>>>>>>>>>>>>>>> ok. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>> I'll give a try on Gateworks GW2347 and see >> if it will be >>>> working >>>>>>>>>>>>>>>>>>>>>>>>>> as it should or not. >>>>>>>>>>>>>>>>>>>>>> Ok, I have a problem with initialization crypto >> on the gw2347 - >>>> the >>>>>>>>>>>>>>>>>>>>>> message: >>>>>>>>>>>>>>>>>>>>>> "ixpCryptoAccCtxRegister failed 6" appears when >> I run openssl - I >>>>>>>>>>>>>>>>>>>>>> have >>>>>>>>>>>>>>>>>>>> Thats sounds weird. It sounds like the crypto >> isn't working >>>> properly >>>>>>>>>>>>>>>>>>>> for some reason. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ixpCryptoAccCtxRegister doesn't need much to work. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> checked and the ixp4xx module when loading >> returns the error that >>>>>>>>>>>>>>>>>>>>>> cannot initialize crypto. >>>>>>>>>>>>>>>>>>>> That is ok, if the network driver init's the >> crypto then you will >>>>>>>>>>>>>>>>>>>> get >>>>>>>>>>>>>>>>>>>> this error since we cannot tell that it has been >> done, yet it >>>>>>>>>>>>>>>>>>>> returns a >>>>>>>>>>>>>>>>>>>> fail if it is already initted. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Might be worth checking the details of the error. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>> Davidm >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>> David McCullough napisa?(a): >>>>>>>>>>>>>>>>>>>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Which access library version are you >> using ? >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The full name is >> ixp400accesslibrarywithcrypto-2.3.1 >>>>>>>>>>>>>>>>>>>>>>>>>>>> Ok, not sure we have tested OCF with >> version 2.3 of the access >>>>>>>>>>>>>>>>>>>>>>>>>>>> lib. >>>>>>>>>>>>>>>>>>>>>>>>>>>> It is part of our tree so I will try it. >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> Not sure you mentioned which sources you >> are using, but the >>>>>>>>>>>>>>>>>>>>>>>>>>>> uClinux-dist or SnapGear dists have very >> good IXP425 support >>>>>>>>>>>>>>>>>>>>>>>>>>>> and less patching ;-) >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Can you load ocf, cryptodev and ixp4xx >> all with debug >>>> enabled: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ocf crypto_debug=1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ixp4xx ixp_debug=1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The run the test, capture all the >> console output and send me >>>> a >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> copy >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for reference. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The output is attached (ocf.log). >>>>>>>>>>>>>>>>>>>>>>>>>>>> Ok, I will try and get some time on it in >> the next day or so, >>>>>>>>>>>>>>>>>>>>>>>>>>>> thanks. >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> Actually, just had a quick look, I think >> the access lib is >>>>>>>>>>>>>>>>>>>>>>>>>>>> blowing the >>>>>>>>>>>>>>>>>>>>>>>>>>>> stack. It is renowned for doing this. >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> If you can try increasing the kernel stack >> size to 8K if it >>>> isn't >>>>>>>>>>>>>>>>>>>>>>>>>>>> already it might help. >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> Otherwise, you may find the info to fix >> it in our access lib >>>>>>>>>>>>>>>>>>>>>>>>>>>> patch: >>>>>>>>>>>>>>>>>>>>>>>>>>>> >> http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>> Or perhaps try the Snapgear/uClinux-dist >> if you have time. We >>>>>>>>>>>>>>>>>>>>>>>>>>>> have all >>>>>>>>>>>>>>>>>>>>>>>>>>>> these sort or problems sorted already ;-) >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Have you tried turning off preemption >> ? I don't think I have >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ever >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tested with that. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Yes, I have tried but didn't help :( >>>>>>>>>>>>>>>>>>>>>>>>>>>> Oh well, looks like a real bug then ;-) >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>>>>>>>>>> Davidm >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> David McCullough napisa?(a): >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Jivin Tomasz Rostanski lays it >> down ... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I tried using ixp4xx module for >> hardware crypto on my >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ixp425 device with kernel >> 2.6.18-rt7 (PREEMPT_DESKTOP). >>>> I'm >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> using ixp400 access library with >> crypto in version 2.3.1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> and ixp400_eth driver in version >> 1.6 (with Intel's patch >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for OCF support - >>>>>>>>>>>>>>>>>> http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I'm loading the modules like >> described in Intel readme: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> mknod /dev/crypto c 10 70 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> mknod -m 666 /dev/ixNpe c 241 0 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ixp400 >/dev/null >> 2>/dev/null >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ixp400_eth >/dev/null >> 2>/dev/null >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ocf >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe cryptodev >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> modprobe ixp4xx ixp_init_crypto=0 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Then when I run the: openssl >> speed -elapsed -evp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> des-ede3-cbc -cpu -engine >> cryptodev the device hangs (I'm >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> using openssl-0.9.8a patched for >> OCF). The same happend >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> when I tried to connect from the >> device using ssh. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I have enabled debugging and saw >> that the debugging from >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ixp_q_process is the last one >> displayed. So I have started >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> adding some debug messages to >> that function and found that >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> the hand appears after the >> following code: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> if (IX_CRYPTO_ACC_STATUS_SUCCESS >> == status) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> return; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> So I have changed return to goto >> done and check what will >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> happen - this time the openssl >> didn't hang and did it's >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> work. But the ssh is not working >> - displays evp_crypt: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> EVP_Cipher failed and exits. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I have tried the cryptosoft >> module instead of ixp4xx and >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> this one works without any >> problems, so it seems that some >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> problem exists in ixp4xx module. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Do you have any clue what could >> be wrong? I'm almost sure >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> that someday on older kernel >> (2.6.12) I got ixp4xx working >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> without problems. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You might want to try >> incorporating the latest code from >>>> the >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> sourceforge >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> site. I haven't seen a like up >> like you describe on the >>>> ixp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for a long >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> time and I don't know exactly >> everything that is in the >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Intel patches. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Try out the latest download at: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ocf-linux.sourceforge.net >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> and then it will be much easier >> for me to help you. I run >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IXP boards >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> here and can easily try some things, >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Davidm >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>> -- >>>> David McCullough, dav...@se..., Ph:+61 >> 734352815 >>>> Secure Computing - SnapGear http://www.uCdot.org >> http://www.cyberguard.com >>>> >>>> > |
From: David M. <Dav...@se...> - 2007-10-19 05:37:18
|
Jivin Tomasz Rostanski lays it down ... > Hi David, > > Do you made any progress? Yep, sorry for the delay, just ran it up on 2.6.23 using CSR2.4 and ocf. Seems to be ok. Haven't tried ipsec yet, but openssl speed works fine (although throughput seems to be down). The driver is at least processing requests ok. Are you installing the correct NPE code with something like: cat /etc/IxNpeMicrocode.dat >/dev/ixNpe Cheers, Davidm > > -----Wiadomość oryginalna----- > > > Od: David McCullough [mailto:Dav...@se...] > > > Wysłano: Pt 2007-09-28 15:25 > > > Do: Rostanski, Tomasz > > > DW: ocf...@li... > > > Temat: Re: OCF's ixp4xx freeze on 2.6.18-rt7 > > > > > > > > > Jivin Tomasz Rostanski lays it down ... > >> > > David, > >> > > > >>> > > >The latest I can try with easily is 2.3. Do you have that ? > >> > > > >> > > We've been using version 2.3 but the OCF wasn't working too. > Some time > >> > > ago we have moved to the version 2.4 because we have found it > working > >> > > faster that the 2.3 (or maybe I have configured it better). > > > > > > :-) > > > > >> > > I know the version 3.0 is released so I would like to try it > too. It > >> > > should have the ethernet driver written better, so perhaps > someday I > >> > > would need to go to 3.0. > > > > > > Check the release notes for 3.0, ixp42x has been dropped, ixp43x and > > > ixp46x are still supported. Looks like 2.4 is the last for the > > > ixp420/425. > > > > >>> > > >I believe we have 2.4 going into our tree very soon now (week > or so) > >>> > > >so I can try it then. > >> > > > >> > > Ok, so please let me know how would it work then. > > > > > > Once it's in I'll let you know, > > > > > > Cheers, > > > Davidm > > > > >>>> > > >>David McCullough pisze: > >>>>> > > >>>Jivin Tomasz Rostanski lays it down ... > >>>>>> > > >>>>Hi, > >>>>>> > > >>>> > >>>>>> > > >>>>It seems that the crypto_done is never been called, so > the loop is > >>>>>> > > >>>>waiting infinitive and the device freezes. > >>>>>> > > >>>>So it definitelly could as you have described. However I > have checked > >>>>>> > > >>>>the function ixCryptoAccAuthCryptPerform to see if it > has changed > > > since > >>>>>> > > >>>>2.0 version of the library but is exactly the same. > >>>>>> > > >>>>I'll try to find what are the differences in crypto part > of the > > > library > >>>>>> > > >>>>- maybe there I will find the clue. > >>>>> > > >>>Lets hope. We have 2.1 running here (not sure if thats in > your tree or > >>>>> > > >>>not). It seems to be behaving so far. Mostly IXP465 > testing though. > >>>>> > > >>> > >>>>>> > > >>>>btw. The ixpCryptoAccCtxRegister failed 6 error I got > when I tried to > >>>>>> > > >>>>run this on another board - I have returned to my > current one ;) > >>>>> > > >>>Ok, best I can tell, 6 = ALG unsupported, which doesn't > really make > >>>>> > > >>>sense, but perhaps that helps you. You can find the enum > (grrr enum > >>>>> > > >>>errors) in: > >>>>> > > >>> > >>>>> > > >>> ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h > >>>>> > > >>> > >>>>> > > >>>Cheers, > >>>>> > > >>>Davidm > >>>>> > > >>> > >>>>>> > > >>>>David McCullough wrote: > >>>>>>> > > >>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>> > > >>>>>>Hi, > >>>>>>>> > > >>>>>> > >>>>>>>> > > >>>>>>I have debug the code a bit and found where the > freeze is. > >>>>>>>> > > >>>>>>The waiting code in cryptodev_op is never ending > from the while > > > loop: > >>>>>>>> > > >>>>>>do { > >>>>>>>> > > >>>>>> wait_event_interruptible(...); > >>>>>>>> > > >>>>>>} while ((crp->crp_flags & CRYPTO_F_DONE) == 0); > >>>>>>>> > > >>>>>> > >>>>>>>> > > >>>>>>When I set the rp->crp_flags to CRYPTO_F_DONE in > ixp_q_process > > > before > >>>>>>>> > > >>>>>>return when status equals to > IX_CRYPTO_ACC_STATUS_SUCCESS the freeze > > > > >>>>>>>> > > >>>>>>is not happening. > >>>>>>>> > > >>>>>>So maybe there is something is wrong with > wait_event_interruptible > >>>>>>>> > > >>>>>>function in my kernel or I don't know. > >>>>>>> > > >>>>>We have seen something like this just recently. A > hash of a 0 length > >>>>>>> > > >>>>>buffer would cause an error and the access lib would > not report it, > > > or > >>>>>>> > > >>>>>call the callback. > >>>>>>> > > >>>>> > >>>>>>> > > >>>>>Any chance you are doing something like this ? > >>>>>>> > > >>>>> > >>>>>>> > > >>>>>Setting CRYPTO_F_DONE in ixp_q_process when you get a > >>>>>>> > > >>>>>IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be > returning > > > before > >>>>>>> > > >>>>>the operation is completed. > >>>>>>> > > >>>>> > >>>>>>> > > >>>>>CRYPTO_F_DONE is set by the call to crypto_done, > which happens on > >>>>>>> > > >>>>>error > >>>>>>> > > >>>>>or when the callback occurs. > >>>>>>> > > >>>>> > >>>>>>> > > >>>>>I am guessing you are past this error as well: > >>>>>>> > > >>>>> > >>>>>>> > > >>>>> "ixpCryptoAccCtxRegister failed 6" > >>>>>>> > > >>>>> > >>>>>>> > > >>>>>Cheers, > >>>>>>> > > >>>>>Davidm > >>>>>>> > > >>>>> > >>>>>>> > > >>>>> > >>>>>>>> > > >>>>>>David McCullough napisa?(a): > >>>>>>>>> > > >>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>> > > >>>>>>>>Hi, > >>>>>>>>>> > > >>>>>>>> > >>>>>>>>>>>> > > >>>>>>>>>>I have checked the latest ixp400 access lib > (2.4) and ixp_400 > >>>>>>>>>>>> > > >>>>>>>>>>ethernet driver (1.7). I didn't use the > Intel patches for crypto > > > > >>>>>>>>>>>> > > >>>>>>>>>>initialization in ixp400_eth. > >>>>>>>>>>>> > > >>>>>>>>>>The result is still the same - the device > freezes when I run > >>>>>>>>>>>> > > >>>>>>>>>>openssl or ssh. > >>>>>>>>>>>> > > >>>>>>>>>>I'm having microcode compiled in driver - > load it from file to > >>>>>>>>>>>> > > >>>>>>>>>>/dev/ixNpe, so I have recompiled it and load > the microcode from > >>>>>>>>>>>> > > >>>>>>>>>>file but this didn't make any difference. > >>>>>>>>>>> > > >>>>>>>>>Are you using the "crypto version" of the > access library ? > >>>>>>>>>> > > >>>>>>>>Yes, I'm using the crypto version of the library. > >>>>>>>>>> > > >>>>>>>> > >>>>>>>>>>>> > > >>>>>>>>>>Could this issue be related with the > hardware? I'm using the > >>>>>>>>>>>> > > >>>>>>>>>>AirTegrity box which was designed completely > by them and not > > > uses > >>>>>>>>>>>> > > >>>>>>>>>>redboot bootloader but their own one. Could > it be the reason of > >>>>>>>>>>>> > > >>>>>>>>>>the problem I'm having? > >>>>>>>>>>> > > >>>>>>>>>No, we do the same, it has no bearing on how > the NPE's do their > > > > >>>>>>>>>>> > > >>>>>>>>>thing. > >>>>>>>>>>> > > >>>>>>>>> > >>>>>>>>>>> > > >>>>>>>>>Are you loading the correct NPE code (with > crypto support etc). > >>>>>>>>>> > > >>>>>>>>Normally I have NPE code compiled in the > sources. I'm using the > >>>>>>>>>> > > >>>>>>>>version with crypto support so it should be ok. > >>>>>>>>> > > >>>>>>>ok. > >>>>>>>>> > > >>>>>>> > >>>>>>>>>>>> > > >>>>>>>>>>I'll give a try on Gateworks GW2347 and see > if it will be > > > working > >>>>>>>>>>>> > > >>>>>>>>>>as it should or not. > >>>>>>>>>> > > >>>>>>>>Ok, I have a problem with initialization crypto > on the gw2347 - > > > the > >>>>>>>>>> > > >>>>>>>>message: > >>>>>>>>>> > > >>>>>>>>"ixpCryptoAccCtxRegister failed 6" appears when > I run openssl - I > >>>>>>>>>> > > >>>>>>>>have > >>>>>>>>> > > >>>>>>>Thats sounds weird. It sounds like the crypto > isn't working > > > properly > >>>>>>>>> > > >>>>>>>for some reason. > >>>>>>>>> > > >>>>>>> > >>>>>>>>> > > >>>>>>>ixpCryptoAccCtxRegister doesn't need much to work. > >>>>>>>>> > > >>>>>>> > >>>>>>>>>> > > >>>>>>>>checked and the ixp4xx module when loading > returns the error that > >>>>>>>>>> > > >>>>>>>>cannot initialize crypto. > >>>>>>>>> > > >>>>>>>That is ok, if the network driver init's the > crypto then you will > >>>>>>>>> > > >>>>>>>get > >>>>>>>>> > > >>>>>>>this error since we cannot tell that it has been > done, yet it > >>>>>>>>> > > >>>>>>>returns a > >>>>>>>>> > > >>>>>>>fail if it is already initted. > >>>>>>>>> > > >>>>>>> > >>>>>>>>> > > >>>>>>>Might be worth checking the details of the error. > >>>>>>>>> > > >>>>>>> > >>>>>>>>> > > >>>>>>>Cheers, > >>>>>>>>> > > >>>>>>>Davidm > >>>>>>>>> > > >>>>>>> > >>>>>>>>>>>> > > >>>>>>>>>>David McCullough napisa?(a): > >>>>>>>>>>>>> > > >>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>>>>>> > > >>>>>>>>>>>>Hi, > >>>>>>>>>>>>>> > > >>>>>>>>>>>> > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Which access library version are you > using ? > >>>>>>>>>>>>>> > > >>>>>>>>>>>>The full name is > ixp400accesslibrarywithcrypto-2.3.1 > >>>>>>>>>>>>> > > >>>>>>>>>>>Ok, not sure we have tested OCF with > version 2.3 of the access > > > > >>>>>>>>>>>>> > > >>>>>>>>>>>lib. > >>>>>>>>>>>>> > > >>>>>>>>>>>It is part of our tree so I will try it. > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>Not sure you mentioned which sources you > are using, but the > >>>>>>>>>>>>> > > >>>>>>>>>>>uClinux-dist or SnapGear dists have very > good IXP425 support > >>>>>>>>>>>>> > > >>>>>>>>>>>and less patching ;-) > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Can you load ocf, cryptodev and ixp4xx > all with debug > > > enabled: > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe ocf crypto_debug=1 > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe ixp4xx ixp_debug=1 > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>The run the test, capture all the > console output and send me > > > a > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>copy > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>for reference. > >>>>>>>>>>>>>> > > >>>>>>>>>>>>The output is attached (ocf.log). > >>>>>>>>>>>>> > > >>>>>>>>>>>Ok, I will try and get some time on it in > the next day or so, > >>>>>>>>>>>>> > > >>>>>>>>>>>thanks. > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>Actually, just had a quick look, I think > the access lib is > >>>>>>>>>>>>> > > >>>>>>>>>>>blowing the > >>>>>>>>>>>>> > > >>>>>>>>>>>stack. It is renowned for doing this. > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>If you can try increasing the kernel stack > size to 8K if it > > > isn't > >>>>>>>>>>>>> > > >>>>>>>>>>>already it might help. > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>Otherwise, you may find the info to fix > it in our access lib > >>>>>>>>>>>>> > > >>>>>>>>>>>patch: > >>>>>>>>>>>>> > > >>>>>>>>>>> > >> > > > >>>>>>>>>>>> > >>>>>>>>>>> > http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>Or perhaps try the Snapgear/uClinux-dist > if you have time. We > >>>>>>>>>>>>> > > >>>>>>>>>>>have all > >>>>>>>>>>>>> > > >>>>>>>>>>>these sort or problems sorted already ;-) > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Have you tried turning off preemption > ? I don't think I have > > > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>ever > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>tested with that. > >>>>>>>>>>>>>> > > >>>>>>>>>>>>Yes, I have tried but didn't help :( > >>>>>>>>>>>>> > > >>>>>>>>>>>Oh well, looks like a real bug then ;-) > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>> > > >>>>>>>>>>>Cheers, > >>>>>>>>>>>>> > > >>>>>>>>>>>Davidm > >>>>>>>>>>>>> > > >>>>>>>>>>> > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>David McCullough napisa?(a): > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Jivin Tomasz Rostanski lays it > down ... > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Hi, > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I tried using ixp4xx module for > hardware crypto on my > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>ixp425 device with kernel > 2.6.18-rt7 (PREEMPT_DESKTOP). > > > I'm > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>using ixp400 access library with > crypto in version 2.3.1 > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>and ixp400_eth driver in version > 1.6 (with Intel's patch > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>for OCF support - > >> > > > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I'm loading the modules like > described in Intel readme: > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>mknod /dev/crypto c 10 70 > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>mknod -m 666 /dev/ixNpe c 241 0 > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp400 >/dev/null > 2>/dev/null > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp400_eth >/dev/null > 2>/dev/null > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ocf > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe cryptodev > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp4xx ixp_init_crypto=0 > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Then when I run the: openssl > speed -elapsed -evp > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>des-ede3-cbc -cpu -engine > cryptodev the device hangs (I'm > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>using openssl-0.9.8a patched for > OCF). The same happend > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>when I tried to connect from the > device using ssh. > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I have enabled debugging and saw > that the debugging from > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>ixp_q_process is the last one > displayed. So I have started > > > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>adding some debug messages to > that function and found that > > > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>the hand appears after the > following code: > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>if (IX_CRYPTO_ACC_STATUS_SUCCESS > == status) > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> return; > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>So I have changed return to goto > done and check what will > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>happen - this time the openssl > didn't hang and did it's > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>work. But the ssh is not working > - displays evp_crypt: > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>EVP_Cipher failed and exits. > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I have tried the cryptosoft > module instead of ixp4xx and > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>this one works without any > problems, so it seems that some > > > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>problem exists in ixp4xx module. > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Do you have any clue what could > be wrong? I'm almost sure > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>that someday on older kernel > (2.6.12) I got ixp4xx working > > > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>without problems. > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>You might want to try > incorporating the latest code from > > > the > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>sourceforge > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>site. I haven't seen a like up > like you describe on the > > > ixp > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>for a long > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>time and I don't know exactly > everything that is in the > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Intel patches. > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Try out the latest download at: > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> ocf-linux.sourceforge.net > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>and then it will be much easier > for me to help you. I run > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>IXP boards > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>here and can easily try some things, > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Cheers, > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Davidm > >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > >>> > > > > >> > > > > > > > > -- > > > David McCullough, dav...@se..., Ph:+61 > 734352815 > > > Secure Computing - SnapGear http://www.uCdot.org > http://www.cyberguard.com > > > > > > > > > > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: David M. <Dav...@se...> - 2007-10-19 00:35:38
|
Jivin Egor N. Martovetsky lays it down ... > David, > > I built OCF linux with the 20070727 release and applied > ocf-openswan-2.4.9-20070727 > patch to the corresponding openswan. I built openswan with NETKEY, and > I'm able to > establish ipsec connection just fine. However, it seems that the > cryptodev is only used > in the beginning, probably by pluto. Is the OCF acceleration only > available when using KLIPS or > can it be used with NETKEY as well? Only using KLIPS sorry, but it works fine on both 2.4 and 2.6 systems providing you have no compeling reason to use netkey that is ;-) Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Egor N. M. <eg...@pa...> - 2007-10-19 00:29:58
|
David, I built OCF linux with the 20070727 release and applied ocf-openswan-2.4.9-20070727 patch to the corresponding openswan. I built openswan with NETKEY, and I'm able to establish ipsec connection just fine. However, it seems that the cryptodev is only used in the beginning, probably by pluto. Is the OCF acceleration only available when using KLIPS or can it be used with NETKEY as well? thanks, -- Egor N. Martovetsky |
From: Tomasz R. <tro...@pr...> - 2007-10-16 13:12:01
|
Hi David, Do you made any progress? Regards, Tomasz > -----Wiadomość oryginalna----- > > Od: David McCullough [mailto:Dav...@se...] > > Wysłano: Pt 2007-09-28 15:25 > > Do: Rostanski, Tomasz > > DW: ocf...@li... > > Temat: Re: OCF's ixp4xx freeze on 2.6.18-rt7 > > > > > > Jivin Tomasz Rostanski lays it down ... >> > > David, >> > > >>> > > >The latest I can try with easily is 2.3. Do you have that ? >> > > >> > > We've been using version 2.3 but the OCF wasn't working too. Some time >> > > ago we have moved to the version 2.4 because we have found it working >> > > faster that the 2.3 (or maybe I have configured it better). > > > > :-) > > >> > > I know the version 3.0 is released so I would like to try it too. It >> > > should have the ethernet driver written better, so perhaps someday I >> > > would need to go to 3.0. > > > > Check the release notes for 3.0, ixp42x has been dropped, ixp43x and > > ixp46x are still supported. Looks like 2.4 is the last for the > > ixp420/425. > > >>> > > >I believe we have 2.4 going into our tree very soon now (week or so) >>> > > >so I can try it then. >> > > >> > > Ok, so please let me know how would it work then. > > > > Once it's in I'll let you know, > > > > Cheers, > > Davidm > > >>>> > > >>David McCullough pisze: >>>>> > > >>>Jivin Tomasz Rostanski lays it down ... >>>>>> > > >>>>Hi, >>>>>> > > >>>> >>>>>> > > >>>>It seems that the crypto_done is never been called, so the loop is >>>>>> > > >>>>waiting infinitive and the device freezes. >>>>>> > > >>>>So it definitelly could as you have described. However I have checked >>>>>> > > >>>>the function ixCryptoAccAuthCryptPerform to see if it has changed > > since >>>>>> > > >>>>2.0 version of the library but is exactly the same. >>>>>> > > >>>>I'll try to find what are the differences in crypto part of the > > library >>>>>> > > >>>>- maybe there I will find the clue. >>>>> > > >>>Lets hope. We have 2.1 running here (not sure if thats in your tree or >>>>> > > >>>not). It seems to be behaving so far. Mostly IXP465 testing though. >>>>> > > >>> >>>>>> > > >>>>btw. The ixpCryptoAccCtxRegister failed 6 error I got when I tried to >>>>>> > > >>>>run this on another board - I have returned to my current one ;) >>>>> > > >>>Ok, best I can tell, 6 = ALG unsupported, which doesn't really make >>>>> > > >>>sense, but perhaps that helps you. You can find the enum (grrr enum >>>>> > > >>>errors) in: >>>>> > > >>> >>>>> > > >>> ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h >>>>> > > >>> >>>>> > > >>>Cheers, >>>>> > > >>>Davidm >>>>> > > >>> >>>>>> > > >>>>David McCullough wrote: >>>>>>> > > >>>>>Jivin Tomasz Rostanski lays it down ... >>>>>>>> > > >>>>>>Hi, >>>>>>>> > > >>>>>> >>>>>>>> > > >>>>>>I have debug the code a bit and found where the freeze is. >>>>>>>> > > >>>>>>The waiting code in cryptodev_op is never ending from the while > > loop: >>>>>>>> > > >>>>>>do { >>>>>>>> > > >>>>>> wait_event_interruptible(...); >>>>>>>> > > >>>>>>} while ((crp->crp_flags & CRYPTO_F_DONE) == 0); >>>>>>>> > > >>>>>> >>>>>>>> > > >>>>>>When I set the rp->crp_flags to CRYPTO_F_DONE in ixp_q_process > > before >>>>>>>> > > >>>>>>return when status equals to IX_CRYPTO_ACC_STATUS_SUCCESS the freeze > > >>>>>>>> > > >>>>>>is not happening. >>>>>>>> > > >>>>>>So maybe there is something is wrong with wait_event_interruptible >>>>>>>> > > >>>>>>function in my kernel or I don't know. >>>>>>> > > >>>>>We have seen something like this just recently. A hash of a 0 length >>>>>>> > > >>>>>buffer would cause an error and the access lib would not report it, > > or >>>>>>> > > >>>>>call the callback. >>>>>>> > > >>>>> >>>>>>> > > >>>>>Any chance you are doing something like this ? >>>>>>> > > >>>>> >>>>>>> > > >>>>>Setting CRYPTO_F_DONE in ixp_q_process when you get a >>>>>>> > > >>>>>IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be returning > > before >>>>>>> > > >>>>>the operation is completed. >>>>>>> > > >>>>> >>>>>>> > > >>>>>CRYPTO_F_DONE is set by the call to crypto_done, which happens on >>>>>>> > > >>>>>error >>>>>>> > > >>>>>or when the callback occurs. >>>>>>> > > >>>>> >>>>>>> > > >>>>>I am guessing you are past this error as well: >>>>>>> > > >>>>> >>>>>>> > > >>>>> "ixpCryptoAccCtxRegister failed 6" >>>>>>> > > >>>>> >>>>>>> > > >>>>>Cheers, >>>>>>> > > >>>>>Davidm >>>>>>> > > >>>>> >>>>>>> > > >>>>> >>>>>>>> > > >>>>>>David McCullough napisa?(a): >>>>>>>>> > > >>>>>>>Jivin Tomasz Rostanski lays it down ... >>>>>>>>>> > > >>>>>>>>Hi, >>>>>>>>>> > > >>>>>>>> >>>>>>>>>>>> > > >>>>>>>>>>I have checked the latest ixp400 access lib (2.4) and ixp_400 >>>>>>>>>>>> > > >>>>>>>>>>ethernet driver (1.7). I didn't use the Intel patches for crypto > > >>>>>>>>>>>> > > >>>>>>>>>>initialization in ixp400_eth. >>>>>>>>>>>> > > >>>>>>>>>>The result is still the same - the device freezes when I run >>>>>>>>>>>> > > >>>>>>>>>>openssl or ssh. >>>>>>>>>>>> > > >>>>>>>>>>I'm having microcode compiled in driver - load it from file to >>>>>>>>>>>> > > >>>>>>>>>>/dev/ixNpe, so I have recompiled it and load the microcode from >>>>>>>>>>>> > > >>>>>>>>>>file but this didn't make any difference. >>>>>>>>>>> > > >>>>>>>>>Are you using the "crypto version" of the access library ? >>>>>>>>>> > > >>>>>>>>Yes, I'm using the crypto version of the library. >>>>>>>>>> > > >>>>>>>> >>>>>>>>>>>> > > >>>>>>>>>>Could this issue be related with the hardware? I'm using the >>>>>>>>>>>> > > >>>>>>>>>>AirTegrity box which was designed completely by them and not > > uses >>>>>>>>>>>> > > >>>>>>>>>>redboot bootloader but their own one. Could it be the reason of >>>>>>>>>>>> > > >>>>>>>>>>the problem I'm having? >>>>>>>>>>> > > >>>>>>>>>No, we do the same, it has no bearing on how the NPE's do their > > >>>>>>>>>>> > > >>>>>>>>>thing. >>>>>>>>>>> > > >>>>>>>>> >>>>>>>>>>> > > >>>>>>>>>Are you loading the correct NPE code (with crypto support etc). >>>>>>>>>> > > >>>>>>>>Normally I have NPE code compiled in the sources. I'm using the >>>>>>>>>> > > >>>>>>>>version with crypto support so it should be ok. >>>>>>>>> > > >>>>>>>ok. >>>>>>>>> > > >>>>>>> >>>>>>>>>>>> > > >>>>>>>>>>I'll give a try on Gateworks GW2347 and see if it will be > > working >>>>>>>>>>>> > > >>>>>>>>>>as it should or not. >>>>>>>>>> > > >>>>>>>>Ok, I have a problem with initialization crypto on the gw2347 - > > the >>>>>>>>>> > > >>>>>>>>message: >>>>>>>>>> > > >>>>>>>>"ixpCryptoAccCtxRegister failed 6" appears when I run openssl - I >>>>>>>>>> > > >>>>>>>>have >>>>>>>>> > > >>>>>>>Thats sounds weird. It sounds like the crypto isn't working > > properly >>>>>>>>> > > >>>>>>>for some reason. >>>>>>>>> > > >>>>>>> >>>>>>>>> > > >>>>>>>ixpCryptoAccCtxRegister doesn't need much to work. >>>>>>>>> > > >>>>>>> >>>>>>>>>> > > >>>>>>>>checked and the ixp4xx module when loading returns the error that >>>>>>>>>> > > >>>>>>>>cannot initialize crypto. >>>>>>>>> > > >>>>>>>That is ok, if the network driver init's the crypto then you will >>>>>>>>> > > >>>>>>>get >>>>>>>>> > > >>>>>>>this error since we cannot tell that it has been done, yet it >>>>>>>>> > > >>>>>>>returns a >>>>>>>>> > > >>>>>>>fail if it is already initted. >>>>>>>>> > > >>>>>>> >>>>>>>>> > > >>>>>>>Might be worth checking the details of the error. >>>>>>>>> > > >>>>>>> >>>>>>>>> > > >>>>>>>Cheers, >>>>>>>>> > > >>>>>>>Davidm >>>>>>>>> > > >>>>>>> >>>>>>>>>>>> > > >>>>>>>>>>David McCullough napisa?(a): >>>>>>>>>>>>> > > >>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>> > > >>>>>>>>>>>>Hi, >>>>>>>>>>>>>> > > >>>>>>>>>>>> >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Which access library version are you using ? >>>>>>>>>>>>>> > > >>>>>>>>>>>>The full name is ixp400accesslibrarywithcrypto-2.3.1 >>>>>>>>>>>>> > > >>>>>>>>>>>Ok, not sure we have tested OCF with version 2.3 of the access > > >>>>>>>>>>>>> > > >>>>>>>>>>>lib. >>>>>>>>>>>>> > > >>>>>>>>>>>It is part of our tree so I will try it. >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>Not sure you mentioned which sources you are using, but the >>>>>>>>>>>>> > > >>>>>>>>>>>uClinux-dist or SnapGear dists have very good IXP425 support >>>>>>>>>>>>> > > >>>>>>>>>>>and less patching ;-) >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Can you load ocf, cryptodev and ixp4xx all with debug > > enabled: >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe ocf crypto_debug=1 >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> modprobe ixp4xx ixp_debug=1 >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>The run the test, capture all the console output and send me > > a >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>copy >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>for reference. >>>>>>>>>>>>>> > > >>>>>>>>>>>>The output is attached (ocf.log). >>>>>>>>>>>>> > > >>>>>>>>>>>Ok, I will try and get some time on it in the next day or so, >>>>>>>>>>>>> > > >>>>>>>>>>>thanks. >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>Actually, just had a quick look, I think the access lib is >>>>>>>>>>>>> > > >>>>>>>>>>>blowing the >>>>>>>>>>>>> > > >>>>>>>>>>>stack. It is renowned for doing this. >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>If you can try increasing the kernel stack size to 8K if it > > isn't >>>>>>>>>>>>> > > >>>>>>>>>>>already it might help. >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>Otherwise, you may find the info to fix it in our access lib >>>>>>>>>>>>> > > >>>>>>>>>>>patch: >>>>>>>>>>>>> > > >>>>>>>>>>> >> > > >>>>>>>>>>>> > >>>>>>>>>>> http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>Or perhaps try the Snapgear/uClinux-dist if you have time. We >>>>>>>>>>>>> > > >>>>>>>>>>>have all >>>>>>>>>>>>> > > >>>>>>>>>>>these sort or problems sorted already ;-) >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>Have you tried turning off preemption ? I don't think I have > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>ever >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>tested with that. >>>>>>>>>>>>>> > > >>>>>>>>>>>>Yes, I have tried but didn't help :( >>>>>>>>>>>>> > > >>>>>>>>>>>Oh well, looks like a real bug then ;-) >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>> > > >>>>>>>>>>>Cheers, >>>>>>>>>>>>> > > >>>>>>>>>>>Davidm >>>>>>>>>>>>> > > >>>>>>>>>>> >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>David McCullough napisa?(a): >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Hi, >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I tried using ixp4xx module for hardware crypto on my >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>ixp425 device with kernel 2.6.18-rt7 (PREEMPT_DESKTOP). > > I'm >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>using ixp400 access library with crypto in version 2.3.1 >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>and ixp400_eth driver in version 1.6 (with Intel's patch >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>for OCF support - >> > > >>>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I'm loading the modules like described in Intel readme: >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>mknod /dev/crypto c 10 70 >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>mknod -m 666 /dev/ixNpe c 241 0 >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp400 >/dev/null 2>/dev/null >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp400_eth >/dev/null 2>/dev/null >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ocf >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe cryptodev >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>modprobe ixp4xx ixp_init_crypto=0 >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Then when I run the: openssl speed -elapsed -evp >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>des-ede3-cbc -cpu -engine cryptodev the device hangs (I'm >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>using openssl-0.9.8a patched for OCF). The same happend >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>when I tried to connect from the device using ssh. >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I have enabled debugging and saw that the debugging from >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>ixp_q_process is the last one displayed. So I have started > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>adding some debug messages to that function and found that > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>the hand appears after the following code: >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> return; >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>So I have changed return to goto done and check what will >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>happen - this time the openssl didn't hang and did it's >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>work. But the ssh is not working - displays evp_crypt: >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>EVP_Cipher failed and exits. >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>I have tried the cryptosoft module instead of ixp4xx and >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>this one works without any problems, so it seems that some > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>problem exists in ixp4xx module. >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>Do you have any clue what could be wrong? I'm almost sure >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>that someday on older kernel (2.6.12) I got ixp4xx working > > >>>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>>without problems. >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>You might want to try incorporating the latest code from > > the >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>sourceforge >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>site. I haven't seen a like up like you describe on the > > ixp >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>for a long >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>time and I don't know exactly everything that is in the >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Intel patches. >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Try out the latest download at: >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> ocf-linux.sourceforge.net >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>and then it will be much easier for me to help you. I run >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>IXP boards >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>here and can easily try some things, >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Cheers, >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>Davidm >>>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> >>> > > > >> > > > > > > -- > > David McCullough, dav...@se..., Ph:+61 734352815 > > Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com > > > > > > |
From: David M. <Dav...@se...> - 2007-10-11 23:45:08
|
Jivin Egor N. Martovetsky lays it down ... > David, > > I was able to go to unlocked_ioctl. Things improved quite > a bit. I suppose this should be included in the next ocf release, Definately > although there > is a chance that it will expose bugs in some drivers - like it did in mine. The driver are supposed to be able to deal with it. I would rather get that sorted out that have a kernel lock anywhere near it :-) > The problem that I saw with ocf-bench, turned out to be my driver > bug after all - I accidentally had one of the variables declared static > in *_process(), > and it was being modified by other threads. Actually, it seems the bkl > was in ioctl > for awhile, I looked in 2.4 tree, it is there. There you go. I would never have thought that some like that would be there. Makes no sense to me :-) I'll work out a patch. > Another issue is that I think the throughput calculation is not correct > in cryptotest.c, > at least not for SMP environment. To calculate the throughput we want > to have > total data size processed divided by real time it took to process it. > So the nops > should always be multiplied by the number of threads. Also, to > calculate time we > are interested in real time, not the time that processes spent running > divided by > the number of threads. This gives incorrect results for SMP systems > with more than 1 thread. Ideally we would synchronize threads, but for > now I take > delta between first process start time and last process stop time as > execution time. Yeah, multi threaded cryptotest has always needed it's results multiplied by the number of threads. I have never bothered to fix it, preferring to keep it as original as possible. Happy to put in a patch though, Cheers, Davidm > >Jivin Egor N. Martovetsky lays it down ... > > > > > >>David - thanks for a quick response. I have comments in line. > >> > >>David McCullough wrote: > >> > >> > >> > >>>Jivin Egor N. Martovetsky lays it down ... > >>> > >>> > >>> > >>> > >>>>David, > >>>> > >>>>I noticed that the throughput I get when using cryptotest or OpenSSL > >>>>speed > >>>>is much worse than what I get using ocf-bench. I also don't get much > >>>>improvement, if at all, when running mutiple threads of the above > >>>>programs. > >>>> > >>>> > >>>> > >>>> > >>>ocf-bench runs in kernel mode, the data does not need to be > >>>copied from user space to kernel space and back. This make a massive > >>>difference to performance. > >>> > >>>All user apps need to pass their data through to the kernel and back. > >>>Unfortunately we don't have a zero copy API for OCF (yet ;-) > >>> > >>>Basically, for OCF accelerated user space, you need to be using larger > >>>packets to help overcome the overheads of the user-kernel-user copies, > >>>but it will never be a good as in-kernel crypto with a zero copy > >>>interface. > >>> > >>> > >>Yes, I was aware of the copying, and it explains some of the performance > >>degradation, > >>that I see with a single thread user space program vs. kernel mode. As > >>you point out, the performance > >>of user space program gets better relative to kernel mode, as the packet > >>size is increased. However, > >>in ocf-bench I can keep cpu 100% utilized submitting and processing done > >>packets, while a single thread > >>of cryptotest is unable to do that, so I tried to run a few threads, and > >>saw the throughput get worse. > >> > >> > > > >All that makes sense, except that it got worse, see below. > > > > > > > >>>>It seems that this is a result of using ioctl(vs unlocked_ioctl) to > >>>>access /dev/crypto, which > >>>>would only allow one process doing crypto at a given time. Is that a > >>>>known problem and > >>>>are there plans to fix it? > >>>> > >>>> > >>>I wasn't aware that ioctl would prevent multiple processes from working > >>>in parallel. I have seen performance improvements with multiple threads > >>>on 2.4 systems. Haven't checked on 2.6 > >>> > >>> > >>In 2.6 kernel the do_ioctl() function in fs/ioctl.c does a kernel lock > >>before calling device's ioctl. > >> > >> > > > >Ok, that is just plain ugly :-( This used to be ok and I obviously missed > >the addition of ioctl_unlocked and the BKL. > > > >It should be safe to switch cryptodev across to ioctl_unlocked since > >that is what the code expects (and gets on other kernels/systems). > > > > > > > >>Since cryptodev ioctl submits a packet and waits for completion before > >>returning, effectively > >>only one request can be processed at a given time, and I am not able to > >>take advantage of multiple > >>crypto channels executing in parallel. > >> > >> > >> > >>>>Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the > >>>>crp_flags to make it work, > >>>>otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. > >>>> > >>>> > >>>I have never thought nor checked that ocf-bench is SMP safe. Which OCF > >>>driver are you using when doing your tests ? It could explain a few > >>>things, > >>> > >>> > >>> > >>It's my own driver, for a new PA Semi chip, and since it is still under > >>development - > >>yes, it can explain a few things. :) > >> > >> > > > >I was more interested in whether is was cryptosoft or one of the HW > >drivers. Generally the HW drivers work better with immediate callbacks > >as there is still a "gap" between the callin and callback. > > > >When your completion call is run before you have returned from the > >initial request, your code needs to be a lot more careful ;-) > > > >Unfortunately OCF hasn't had a huge amount of SMP focus. I have run it > >on SMP machines using hifn drivers, but not that often. So you may hit > >some other SMP issues. > > > > > > > >>But in this case, I don't think so, because in general it works fine, > >>and ocf-bench > >>works fine in nosmp mode, or with CRYPTO_F_BATCH mode, which makes > >>the completions go through a callback queue that is protected by > >>spinlocks, as opposed > >>to immediate callbacks. > >> > >> > > > >If you get a handle on what is happening let me know, it would be nice > >to get it fixed. > > > >Cheers, > >Davidm > > > > > > > > > -- > Egor N. Martovetsky > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Egor N. M. <eg...@pa...> - 2007-10-11 18:29:18
|
David, I was able to go to unlocked_ioctl. Things improved quite a bit. I suppose this should be included in the next ocf release, although there is a chance that it will expose bugs in some drivers - like it did in mine. The problem that I saw with ocf-bench, turned out to be my driver bug after all - I accidentally had one of the variables declared static in *_process(), and it was being modified by other threads. Actually, it seems the bkl was in ioctl for awhile, I looked in 2.4 tree, it is there. Another issue is that I think the throughput calculation is not correct in cryptotest.c, at least not for SMP environment. To calculate the throughput we want to have total data size processed divided by real time it took to process it. So the nops should always be multiplied by the number of threads. Also, to calculate time we are interested in real time, not the time that processes spent running divided by the number of threads. This gives incorrect results for SMP systems with more than 1 thread. Ideally we would synchronize threads, but for now I take delta between first process start time and last process stop time as execution time. David McCullough wrote: >Jivin Egor N. Martovetsky lays it down ... > > >>David - thanks for a quick response. I have comments in line. >> >>David McCullough wrote: >> >> >> >>>Jivin Egor N. Martovetsky lays it down ... >>> >>> >>> >>> >>>>David, >>>> >>>>I noticed that the throughput I get when using cryptotest or OpenSSL speed >>>>is much worse than what I get using ocf-bench. I also don't get much >>>>improvement, if at all, when running mutiple threads of the above >>>>programs. >>>> >>>> >>>> >>>> >>>ocf-bench runs in kernel mode, the data does not need to be >>>copied from user space to kernel space and back. This make a massive >>>difference to performance. >>> >>>All user apps need to pass their data through to the kernel and back. >>>Unfortunately we don't have a zero copy API for OCF (yet ;-) >>> >>>Basically, for OCF accelerated user space, you need to be using larger >>>packets to help overcome the overheads of the user-kernel-user copies, >>>but it will never be a good as in-kernel crypto with a zero copy >>>interface. >>> >>> >>Yes, I was aware of the copying, and it explains some of the performance >>degradation, >>that I see with a single thread user space program vs. kernel mode. As >>you point out, the performance >>of user space program gets better relative to kernel mode, as the packet >>size is increased. However, >>in ocf-bench I can keep cpu 100% utilized submitting and processing done >>packets, while a single thread >>of cryptotest is unable to do that, so I tried to run a few threads, and >>saw the throughput get worse. >> >> > >All that makes sense, except that it got worse, see below. > > > >>>>It seems that this is a result of using ioctl(vs unlocked_ioctl) to >>>>access /dev/crypto, which >>>>would only allow one process doing crypto at a given time. Is that a >>>>known problem and >>>>are there plans to fix it? >>>> >>>> >>>I wasn't aware that ioctl would prevent multiple processes from working >>>in parallel. I have seen performance improvements with multiple threads >>>on 2.4 systems. Haven't checked on 2.6 >>> >>> >>In 2.6 kernel the do_ioctl() function in fs/ioctl.c does a kernel lock >>before calling device's ioctl. >> >> > >Ok, that is just plain ugly :-( This used to be ok and I obviously missed >the addition of ioctl_unlocked and the BKL. > >It should be safe to switch cryptodev across to ioctl_unlocked since >that is what the code expects (and gets on other kernels/systems). > > > >>Since cryptodev ioctl submits a packet and waits for completion before >>returning, effectively >>only one request can be processed at a given time, and I am not able to >>take advantage of multiple >>crypto channels executing in parallel. >> >> >> >>>>Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the >>>>crp_flags to make it work, >>>>otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. >>>> >>>> >>>I have never thought nor checked that ocf-bench is SMP safe. Which OCF >>>driver are you using when doing your tests ? It could explain a few >>>things, >>> >>> >>> >>It's my own driver, for a new PA Semi chip, and since it is still under >>development - >>yes, it can explain a few things. :) >> >> > >I was more interested in whether is was cryptosoft or one of the HW >drivers. Generally the HW drivers work better with immediate callbacks >as there is still a "gap" between the callin and callback. > >When your completion call is run before you have returned from the >initial request, your code needs to be a lot more careful ;-) > >Unfortunately OCF hasn't had a huge amount of SMP focus. I have run it >on SMP machines using hifn drivers, but not that often. So you may hit >some other SMP issues. > > > >>But in this case, I don't think so, because in general it works fine, >>and ocf-bench >>works fine in nosmp mode, or with CRYPTO_F_BATCH mode, which makes >>the completions go through a callback queue that is protected by >>spinlocks, as opposed >>to immediate callbacks. >> >> > >If you get a handle on what is happening let me know, it would be nice >to get it fixed. > >Cheers, >Davidm > > > -- Egor N. Martovetsky |
From: David M. <Dav...@se...> - 2007-10-10 22:25:18
|
Jivin Egor N. Martovetsky lays it down ... > David - thanks for a quick response. I have comments in line. > > David McCullough wrote: > > >Jivin Egor N. Martovetsky lays it down ... > > > > > >>David, > >> > >>I noticed that the throughput I get when using cryptotest or OpenSSL speed > >>is much worse than what I get using ocf-bench. I also don't get much > >>improvement, if at all, when running mutiple threads of the above > >>programs. > >> > >> > > > >ocf-bench runs in kernel mode, the data does not need to be > >copied from user space to kernel space and back. This make a massive > >difference to performance. > > > >All user apps need to pass their data through to the kernel and back. > >Unfortunately we don't have a zero copy API for OCF (yet ;-) > > > >Basically, for OCF accelerated user space, you need to be using larger > >packets to help overcome the overheads of the user-kernel-user copies, > >but it will never be a good as in-kernel crypto with a zero copy > >interface. > > Yes, I was aware of the copying, and it explains some of the performance > degradation, > that I see with a single thread user space program vs. kernel mode. As > you point out, the performance > of user space program gets better relative to kernel mode, as the packet > size is increased. However, > in ocf-bench I can keep cpu 100% utilized submitting and processing done > packets, while a single thread > of cryptotest is unable to do that, so I tried to run a few threads, and > saw the throughput get worse. All that makes sense, except that it got worse, see below. > >>It seems that this is a result of using ioctl(vs unlocked_ioctl) to > >>access /dev/crypto, which > >>would only allow one process doing crypto at a given time. Is that a > >>known problem and > >>are there plans to fix it? > > > >I wasn't aware that ioctl would prevent multiple processes from working > >in parallel. I have seen performance improvements with multiple threads > >on 2.4 systems. Haven't checked on 2.6 > > In 2.6 kernel the do_ioctl() function in fs/ioctl.c does a kernel lock > before calling device's ioctl. Ok, that is just plain ugly :-( This used to be ok and I obviously missed the addition of ioctl_unlocked and the BKL. It should be safe to switch cryptodev across to ioctl_unlocked since that is what the code expects (and gets on other kernels/systems). > Since cryptodev ioctl submits a packet and waits for completion before > returning, effectively > only one request can be processed at a given time, and I am not able to > take advantage of multiple > crypto channels executing in parallel. > > >>Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the > >>crp_flags to make it work, > >>otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. > > > >I have never thought nor checked that ocf-bench is SMP safe. Which OCF > >driver are you using when doing your tests ? It could explain a few > >things, > > > > It's my own driver, for a new PA Semi chip, and since it is still under > development - > yes, it can explain a few things. :) I was more interested in whether is was cryptosoft or one of the HW drivers. Generally the HW drivers work better with immediate callbacks as there is still a "gap" between the callin and callback. When your completion call is run before you have returned from the initial request, your code needs to be a lot more careful ;-) Unfortunately OCF hasn't had a huge amount of SMP focus. I have run it on SMP machines using hifn drivers, but not that often. So you may hit some other SMP issues. > But in this case, I don't think so, because in general it works fine, > and ocf-bench > works fine in nosmp mode, or with CRYPTO_F_BATCH mode, which makes > the completions go through a callback queue that is protected by > spinlocks, as opposed > to immediate callbacks. If you get a handle on what is happening let me know, it would be nice to get it fixed. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Egor N. M. <eg...@pa...> - 2007-10-10 21:42:14
|
David - thanks for a quick response. I have comments in line. David McCullough wrote: >Jivin Egor N. Martovetsky lays it down ... > > >>David, >> >>I noticed that the throughput I get when using cryptotest or OpenSSL speed >>is much worse than what I get using ocf-bench. I also don't get much >>improvement, if at all, when running mutiple threads of the above programs. >> >> > >ocf-bench runs in kernel mode, the data does not need to be >copied from user space to kernel space and back. This make a massive >difference to performance. > >All user apps need to pass their data through to the kernel and back. >Unfortunately we don't have a zero copy API for OCF (yet ;-) > >Basically, for OCF accelerated user space, you need to be using larger >packets to help overcome the overheads of the user-kernel-user copies, >but it will never be a good as in-kernel crypto with a zero copy >interface. > > > Yes, I was aware of the copying, and it explains some of the performance degradation, that I see with a single thread user space program vs. kernel mode. As you point out, the performance of user space program gets better relative to kernel mode, as the packet size is increased. However, in ocf-bench I can keep cpu 100% utilized submitting and processing done packets, while a single thread of cryptotest is unable to do that, so I tried to run a few threads, and saw the throughput get worse. >>It seems that this is a result of using ioctl(vs unlocked_ioctl) to >>access /dev/crypto, which >>would only allow one process doing crypto at a given time. Is that a >>known problem and >>are there plans to fix it? >> >> > >I wasn't aware that ioctl would prevent multiple processes from working >in parallel. I have seen performance improvements with multiple threads >on 2.4 systems. Haven't checked on 2.6 > > > In 2.6 kernel the do_ioctl() function in fs/ioctl.c does a kernel lock before calling device's ioctl. Since cryptodev ioctl submits a packet and waits for completion before returning, effectively only one request can be processed at a given time, and I am not able to take advantage of multiple crypto channels executing in parallel. >>Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the >>crp_flags to make it work, >>otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. >> >> > >I have never thought nor checked that ocf-bench is SMP safe. Which OCF >driver are you using when doing your tests ? It could explain a few >things, > > It's my own driver, for a new PA Semi chip, and since it is still under development - yes, it can explain a few things. :) But in this case, I don't think so, because in general it works fine, and ocf-bench works fine in nosmp mode, or with CRYPTO_F_BATCH mode, which makes the completions go through a callback queue that is protected by spinlocks, as opposed to immediate callbacks. >Cheers, >Davidm > > > -- Egor N. Martovetsky |
From: David M. <Dav...@se...> - 2007-10-10 11:28:29
|
Jivin Egor N. Martovetsky lays it down ... > David, > > I noticed that the throughput I get when using cryptotest or OpenSSL speed > is much worse than what I get using ocf-bench. I also don't get much > improvement, if at all, when running mutiple threads of the above programs. ocf-bench runs in kernel mode, the data does not need to be copied from user space to kernel space and back. This make a massive difference to performance. All user apps need to pass their data through to the kernel and back. Unfortunately we don't have a zero copy API for OCF (yet ;-) Basically, for OCF accelerated user space, you need to be using larger packets to help overcome the overheads of the user-kernel-user copies, but it will never be a good as in-kernel crypto with a zero copy interface. > It seems that this is a result of using ioctl(vs unlocked_ioctl) to > access /dev/crypto, which > would only allow one process doing crypto at a given time. Is that a > known problem and > are there plans to fix it? I wasn't aware that ioctl would prevent multiple processes from working in parallel. I have seen performance improvements with multiple threads on 2.4 systems. Haven't checked on 2.6 > Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the > crp_flags to make it work, > otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. I have never thought nor checked that ocf-bench is SMP safe. Which OCF driver are you using when doing your tests ? It could explain a few things, Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Egor N. M. <eg...@pa...> - 2007-10-09 19:15:23
|
David, I noticed that the throughput I get when using cryptotest or OpenSSL speed is much worse than what I get using ocf-bench. I also don't get much improvement, if at all, when running mutiple threads of the above programs. It seems that this is a result of using ioctl(vs unlocked_ioctl) to access /dev/crypto, which would only allow one process doing crypto at a given time. Is that a known problem and are there plans to fix it? Also, is ocf-bench SMP safe? I had to set CRYPTO_F_BATCH in the crp_flags to make it work, otherwise with the CRYPTO_F_CBIMM it would not work in the SMP mode. thanks, -- Egor N. Martovetsky |
From: David M. <Dav...@se...> - 2007-09-28 14:55:22
|
Jivin Albert Lash lays it down ... > Hi David, > > If I rmmod cryptodev then it no longer fails. I am using > ocf-linux-20070727 patching linux-source-2.6.22. Nothing we have since that release will help you, only some cleanups and ixp updates. You have the appropriate cryptoAPI algs turned on ? I am guessing so. I'll be offline for a few days so even tardier than usual :-) About the only thing I think to send is the debug output when running cryptosoft/cryptodev with debug enabled. See the install doc for instructions. Cheers, Davidm > Let me know if there is any more pertinent information I can send. > > Albert > > On 9/26/07, David McCullough <Dav...@se...> wrote: > > > > Jivin Albert Lash lays it down ... > > > Hello, > > > > > > Nice work on ocf-linux. I've got a geode lx800 which has an aes block, > > > and the driver automatically makes it available to the linux > > > cryptoapi. I've tested with cryptotest and it works with the cryptodev > > > module, and I patched openssl-0.9.8e and achieved positive results as > > > well. > > > > > > I have the original openssl shipped with ubuntu in /usr/ssl, and the > > > patched version in /usr/local/ssl. Although I read you don't have to > > > patch openssh, I assumed you'd have to link it to the patched version > > > of openssl. I did so using the most recent version of openssh, and > > > configured like so: > > > > > > ./configure --with-ssl-dir=/usr/local/ssl --with-ssl-engine > > > > > > It builds fine, but when I try to scp a file I get a corrupted MAC > > > error. I can ssh but I do get errors: > > > > > > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 > > > logout > > > debug1: channel 0: free: client-session, nchannels 1 > > > Connection to 192.168.0.32 closed. > > > debug1: Transferred: stdin 0, stdout 0, stderr 36 bytes in 10.1 seconds > > > debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 3.6 > > > debug1: Exit status 0 > > > > If you remove /dev/crypto does it still fail ? > > > > If not then OCF is most likely to blame. Which ocf version are you using ? > > Then I can check to see if there are any updates we have made that may > > apply to what you are doing :-) > > > > Cheers, > > Davidm > > > > -- > > David McCullough, dav...@se..., Ph:+61 734352815 > > Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com > > > > > -- > My Blogs: > http://www.docunext.com/ > http://www.albertlash.com/ > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: David M. <Dav...@se...> - 2007-09-28 13:57:44
|
Jivin Albert Lash lays it down ... > Does anyone know if the OCF patches and the ixp4xx driver works with > the Linksys NSLU2? Not as far as I can see. The NSLU2 has an IXP420, which does not have the crypto HW. Unless they made a newer version with the ixp422 or ixp425, ocf will not get you crypto acceleration. Some of the WRTG devices have a 422 IIRC, Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Albert L. <alb...@gm...> - 2007-09-28 13:35:17
|
Does anyone know if the OCF patches and the ixp4xx driver works with the Linksys NSLU2? Thanks, Albert -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ |
From: David M. <Dav...@se...> - 2007-09-28 13:24:23
|
Jivin Tomasz Rostanski lays it down ... > David, > > >The latest I can try with easily is 2.3. Do you have that ? > > We've been using version 2.3 but the OCF wasn't working too. Some time > ago we have moved to the version 2.4 because we have found it working > faster that the 2.3 (or maybe I have configured it better). :-) > I know the version 3.0 is released so I would like to try it too. It > should have the ethernet driver written better, so perhaps someday I > would need to go to 3.0. Check the release notes for 3.0, ixp42x has been dropped, ixp43x and ixp46x are still supported. Looks like 2.4 is the last for the ixp420/425. > >I believe we have 2.4 going into our tree very soon now (week or so) > >so I can try it then. > > Ok, so please let me know how would it work then. Once it's in I'll let you know, Cheers, Davidm > >>David McCullough pisze: > >>>Jivin Tomasz Rostanski lays it down ... > >>>>Hi, > >>>> > >>>>It seems that the crypto_done is never been called, so the loop is > >>>>waiting infinitive and the device freezes. > >>>>So it definitelly could as you have described. However I have checked > >>>>the function ixCryptoAccAuthCryptPerform to see if it has changed since > >>>>2.0 version of the library but is exactly the same. > >>>>I'll try to find what are the differences in crypto part of the library > >>>>- maybe there I will find the clue. > >>>Lets hope. We have 2.1 running here (not sure if thats in your tree or > >>>not). It seems to be behaving so far. Mostly IXP465 testing though. > >>> > >>>>btw. The ixpCryptoAccCtxRegister failed 6 error I got when I tried to > >>>>run this on another board - I have returned to my current one ;) > >>>Ok, best I can tell, 6 = ALG unsupported, which doesn't really make > >>>sense, but perhaps that helps you. You can find the enum (grrr enum > >>>errors) in: > >>> > >>> ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h > >>> > >>>Cheers, > >>>Davidm > >>> > >>>>David McCullough wrote: > >>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>Hi, > >>>>>> > >>>>>>I have debug the code a bit and found where the freeze is. > >>>>>>The waiting code in cryptodev_op is never ending from the while loop: > >>>>>>do { > >>>>>> wait_event_interruptible(...); > >>>>>>} while ((crp->crp_flags & CRYPTO_F_DONE) == 0); > >>>>>> > >>>>>>When I set the rp->crp_flags to CRYPTO_F_DONE in ixp_q_process before > >>>>>>return when status equals to IX_CRYPTO_ACC_STATUS_SUCCESS the freeze > >>>>>>is not happening. > >>>>>>So maybe there is something is wrong with wait_event_interruptible > >>>>>>function in my kernel or I don't know. > >>>>>We have seen something like this just recently. A hash of a 0 length > >>>>>buffer would cause an error and the access lib would not report it, or > >>>>>call the callback. > >>>>> > >>>>>Any chance you are doing something like this ? > >>>>> > >>>>>Setting CRYPTO_F_DONE in ixp_q_process when you get a > >>>>>IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be returning before > >>>>>the operation is completed. > >>>>> > >>>>>CRYPTO_F_DONE is set by the call to crypto_done, which happens on > >>>>>error > >>>>>or when the callback occurs. > >>>>> > >>>>>I am guessing you are past this error as well: > >>>>> > >>>>> "ixpCryptoAccCtxRegister failed 6" > >>>>> > >>>>>Cheers, > >>>>>Davidm > >>>>> > >>>>> > >>>>>>David McCullough napisa?(a): > >>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>Hi, > >>>>>>>> > >>>>>>>>>>I have checked the latest ixp400 access lib (2.4) and ixp_400 > >>>>>>>>>>ethernet driver (1.7). I didn't use the Intel patches for crypto > >>>>>>>>>>initialization in ixp400_eth. > >>>>>>>>>>The result is still the same - the device freezes when I run > >>>>>>>>>>openssl or ssh. > >>>>>>>>>>I'm having microcode compiled in driver - load it from file to > >>>>>>>>>>/dev/ixNpe, so I have recompiled it and load the microcode from > >>>>>>>>>>file but this didn't make any difference. > >>>>>>>>>Are you using the "crypto version" of the access library ? > >>>>>>>>Yes, I'm using the crypto version of the library. > >>>>>>>> > >>>>>>>>>>Could this issue be related with the hardware? I'm using the > >>>>>>>>>>AirTegrity box which was designed completely by them and not uses > >>>>>>>>>>redboot bootloader but their own one. Could it be the reason of > >>>>>>>>>>the problem I'm having? > >>>>>>>>>No, we do the same, it has no bearing on how the NPE's do their > >>>>>>>>>thing. > >>>>>>>>> > >>>>>>>>>Are you loading the correct NPE code (with crypto support etc). > >>>>>>>>Normally I have NPE code compiled in the sources. I'm using the > >>>>>>>>version with crypto support so it should be ok. > >>>>>>>ok. > >>>>>>> > >>>>>>>>>>I'll give a try on Gateworks GW2347 and see if it will be working > >>>>>>>>>>as it should or not. > >>>>>>>>Ok, I have a problem with initialization crypto on the gw2347 - the > >>>>>>>>message: > >>>>>>>>"ixpCryptoAccCtxRegister failed 6" appears when I run openssl - I > >>>>>>>>have > >>>>>>>Thats sounds weird. It sounds like the crypto isn't working properly > >>>>>>>for some reason. > >>>>>>> > >>>>>>>ixpCryptoAccCtxRegister doesn't need much to work. > >>>>>>> > >>>>>>>>checked and the ixp4xx module when loading returns the error that > >>>>>>>>cannot initialize crypto. > >>>>>>>That is ok, if the network driver init's the crypto then you will > >>>>>>>get > >>>>>>>this error since we cannot tell that it has been done, yet it > >>>>>>>returns a > >>>>>>>fail if it is already initted. > >>>>>>> > >>>>>>>Might be worth checking the details of the error. > >>>>>>> > >>>>>>>Cheers, > >>>>>>>Davidm > >>>>>>> > >>>>>>>>>>David McCullough napisa?(a): > >>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>>>>Hi, > >>>>>>>>>>>> > >>>>>>>>>>>>>Which access library version are you using ? > >>>>>>>>>>>>The full name is ixp400accesslibrarywithcrypto-2.3.1 > >>>>>>>>>>>Ok, not sure we have tested OCF with version 2.3 of the access > >>>>>>>>>>>lib. > >>>>>>>>>>>It is part of our tree so I will try it. > >>>>>>>>>>> > >>>>>>>>>>>Not sure you mentioned which sources you are using, but the > >>>>>>>>>>>uClinux-dist or SnapGear dists have very good IXP425 support > >>>>>>>>>>>and less patching ;-) > >>>>>>>>>>> > >>>>>>>>>>>>>Can you load ocf, cryptodev and ixp4xx all with debug enabled: > >>>>>>>>>>>>> > >>>>>>>>>>>>> modprobe ocf crypto_debug=1 > >>>>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 > >>>>>>>>>>>>> modprobe ixp4xx ixp_debug=1 > >>>>>>>>>>>>> > >>>>>>>>>>>>>The run the test, capture all the console output and send me a > >>>>>>>>>>>>>copy > >>>>>>>>>>>>>for reference. > >>>>>>>>>>>>The output is attached (ocf.log). > >>>>>>>>>>>Ok, I will try and get some time on it in the next day or so, > >>>>>>>>>>>thanks. > >>>>>>>>>>> > >>>>>>>>>>>Actually, just had a quick look, I think the access lib is > >>>>>>>>>>>blowing the > >>>>>>>>>>>stack. It is renowned for doing this. > >>>>>>>>>>> > >>>>>>>>>>>If you can try increasing the kernel stack size to 8K if it isn't > >>>>>>>>>>>already it might help. > >>>>>>>>>>> > >>>>>>>>>>>Otherwise, you may find the info to fix it in our access lib > >>>>>>>>>>>patch: > >>>>>>>>>>> > >>>>>>>>>>> http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > >>>>>>>>>>> > >>>>>>>>>>>Or perhaps try the Snapgear/uClinux-dist if you have time. We > >>>>>>>>>>>have all > >>>>>>>>>>>these sort or problems sorted already ;-) > >>>>>>>>>>> > >>>>>>>>>>>>>Have you tried turning off preemption ? I don't think I have > >>>>>>>>>>>>>ever > >>>>>>>>>>>>>tested with that. > >>>>>>>>>>>>Yes, I have tried but didn't help :( > >>>>>>>>>>>Oh well, looks like a real bug then ;-) > >>>>>>>>>>> > >>>>>>>>>>>Cheers, > >>>>>>>>>>>Davidm > >>>>>>>>>>> > >>>>>>>>>>>>>>David McCullough napisa?(a): > >>>>>>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>>>>>>>>Hi, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>I tried using ixp4xx module for hardware crypto on my > >>>>>>>>>>>>>>>>ixp425 device with kernel 2.6.18-rt7 (PREEMPT_DESKTOP). I'm > >>>>>>>>>>>>>>>>using ixp400 access library with crypto in version 2.3.1 > >>>>>>>>>>>>>>>>and ixp400_eth driver in version 1.6 (with Intel's patch > >>>>>>>>>>>>>>>>for OCF support - > >>>>>>>>>>>>>>>>http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>I'm loading the modules like described in Intel readme: > >>>>>>>>>>>>>>>>mknod /dev/crypto c 10 70 > >>>>>>>>>>>>>>>>mknod -m 666 /dev/ixNpe c 241 0 > >>>>>>>>>>>>>>>>modprobe ixp400 >/dev/null 2>/dev/null > >>>>>>>>>>>>>>>>modprobe ixp400_eth >/dev/null 2>/dev/null > >>>>>>>>>>>>>>>>modprobe ocf > >>>>>>>>>>>>>>>>modprobe cryptodev > >>>>>>>>>>>>>>>>modprobe ixp4xx ixp_init_crypto=0 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>Then when I run the: openssl speed -elapsed -evp > >>>>>>>>>>>>>>>>des-ede3-cbc -cpu -engine cryptodev the device hangs (I'm > >>>>>>>>>>>>>>>>using openssl-0.9.8a patched for OCF). The same happend > >>>>>>>>>>>>>>>>when I tried to connect from the device using ssh. > >>>>>>>>>>>>>>>>I have enabled debugging and saw that the debugging from > >>>>>>>>>>>>>>>>ixp_q_process is the last one displayed. So I have started > >>>>>>>>>>>>>>>>adding some debug messages to that function and found that > >>>>>>>>>>>>>>>>the hand appears after the following code: > >>>>>>>>>>>>>>>>if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) > >>>>>>>>>>>>>>>> return; > >>>>>>>>>>>>>>>>So I have changed return to goto done and check what will > >>>>>>>>>>>>>>>>happen - this time the openssl didn't hang and did it's > >>>>>>>>>>>>>>>>work. But the ssh is not working - displays evp_crypt: > >>>>>>>>>>>>>>>>EVP_Cipher failed and exits. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>I have tried the cryptosoft module instead of ixp4xx and > >>>>>>>>>>>>>>>>this one works without any problems, so it seems that some > >>>>>>>>>>>>>>>>problem exists in ixp4xx module. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>Do you have any clue what could be wrong? I'm almost sure > >>>>>>>>>>>>>>>>that someday on older kernel (2.6.12) I got ixp4xx working > >>>>>>>>>>>>>>>>without problems. > >>>>>>>>>>>>>>>You might want to try incorporating the latest code from the > >>>>>>>>>>>>>>>sourceforge > >>>>>>>>>>>>>>>site. I haven't seen a like up like you describe on the ixp > >>>>>>>>>>>>>>>for a long > >>>>>>>>>>>>>>>time and I don't know exactly everything that is in the > >>>>>>>>>>>>>>>Intel patches. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>Try out the latest download at: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> ocf-linux.sourceforge.net > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>and then it will be much easier for me to help you. I run > >>>>>>>>>>>>>>>IXP boards > >>>>>>>>>>>>>>>here and can easily try some things, > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>Cheers, > >>>>>>>>>>>>>>>Davidm > >>>>>>>>>>>>>>> > > > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Tomasz R. <tro...@pr...> - 2007-09-26 17:08:19
|
David, > The latest I can try with easily is 2.3. Do you have that ? We've been using version 2.3 but the OCF wasn't working too. Some time ago we have moved to the version 2.4 because we have found it working faster that the 2.3 (or maybe I have configured it better). I know the version 3.0 is released so I would like to try it too. It should have the ethernet driver written better, so perhaps someday I would need to go to 3.0. > I believe we have 2.4 going into our tree very soon now (week or so) > so I can try it then. Ok, so please let me know how would it work then. Thanks, Tomasz >> David McCullough pisze: >>> Jivin Tomasz Rostanski lays it down ... >>>> Hi, >>>> >>>> It seems that the crypto_done is never been called, so the loop is >>>> waiting infinitive and the device freezes. >>>> So it definitelly could as you have described. However I have checked >>>> the function ixCryptoAccAuthCryptPerform to see if it has changed since >>>> 2.0 version of the library but is exactly the same. >>>> I'll try to find what are the differences in crypto part of the library >>>> - maybe there I will find the clue. >>> Lets hope. We have 2.1 running here (not sure if thats in your tree or >>> not). It seems to be behaving so far. Mostly IXP465 testing though. >>> >>>> btw. The ixpCryptoAccCtxRegister failed 6 error I got when I tried to >>>> run this on another board - I have returned to my current one ;) >>> Ok, best I can tell, 6 = ALG unsupported, which doesn't really make >>> sense, but perhaps that helps you. You can find the enum (grrr enum >>> errors) in: >>> >>> ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h >>> >>> Cheers, >>> Davidm >>> >>>> David McCullough wrote: >>>>> Jivin Tomasz Rostanski lays it down ... >>>>>> Hi, >>>>>> >>>>>> I have debug the code a bit and found where the freeze is. >>>>>> The waiting code in cryptodev_op is never ending from the while loop: >>>>>> do { >>>>>> wait_event_interruptible(...); >>>>>> } while ((crp->crp_flags & CRYPTO_F_DONE) == 0); >>>>>> >>>>>> When I set the rp->crp_flags to CRYPTO_F_DONE in ixp_q_process before >>>>>> return when status equals to IX_CRYPTO_ACC_STATUS_SUCCESS the freeze is >>>>>> not happening. >>>>>> So maybe there is something is wrong with wait_event_interruptible >>>>>> function in my kernel or I don't know. >>>>> We have seen something like this just recently. A hash of a 0 length >>>>> buffer would cause an error and the access lib would not report it, or >>>>> call the callback. >>>>> >>>>> Any chance you are doing something like this ? >>>>> >>>>> Setting CRYPTO_F_DONE in ixp_q_process when you get a >>>>> IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be returning before >>>>> the operation is completed. >>>>> >>>>> CRYPTO_F_DONE is set by the call to crypto_done, which happens on error >>>>> or when the callback occurs. >>>>> >>>>> I am guessing you are past this error as well: >>>>> >>>>> "ixpCryptoAccCtxRegister failed 6" >>>>> >>>>> Cheers, >>>>> Davidm >>>>> >>>>> >>>>>> David McCullough napisa?(a): >>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>> Hi, >>>>>>>> >>>>>>>>>> I have checked the latest ixp400 access lib (2.4) and ixp_400 >>>>>>>>>> ethernet driver (1.7). I didn't use the Intel patches for crypto >>>>>>>>>> initialization in ixp400_eth. >>>>>>>>>> The result is still the same - the device freezes when I run >>>>>>>>>> openssl or ssh. >>>>>>>>>> I'm having microcode compiled in driver - load it from file to >>>>>>>>>> /dev/ixNpe, so I have recompiled it and load the microcode from >>>>>>>>>> file but this didn't make any difference. >>>>>>>>> Are you using the "crypto version" of the access library ? >>>>>>>> Yes, I'm using the crypto version of the library. >>>>>>>> >>>>>>>>>> Could this issue be related with the hardware? I'm using the >>>>>>>>>> AirTegrity box which was designed completely by them and not uses >>>>>>>>>> redboot bootloader but their own one. Could it be the reason of the >>>>>>>>>> problem I'm having? >>>>>>>>> No, we do the same, it has no bearing on how the NPE's do their >>>>>>>>> thing. >>>>>>>>> >>>>>>>>> Are you loading the correct NPE code (with crypto support etc). >>>>>>>> Normally I have NPE code compiled in the sources. I'm using the >>>>>>>> version with crypto support so it should be ok. >>>>>>> ok. >>>>>>> >>>>>>>>>> I'll give a try on Gateworks GW2347 and see if it will be working >>>>>>>>>> as it should or not. >>>>>>>> Ok, I have a problem with initialization crypto on the gw2347 - the >>>>>>>> message: >>>>>>>> "ixpCryptoAccCtxRegister failed 6" appears when I run openssl - I >>>>>>>> have >>>>>>> Thats sounds weird. It sounds like the crypto isn't working properly >>>>>>> for some reason. >>>>>>> >>>>>>> ixpCryptoAccCtxRegister doesn't need much to work. >>>>>>> >>>>>>>> checked and the ixp4xx module when loading returns the error that >>>>>>>> cannot initialize crypto. >>>>>>> That is ok, if the network driver init's the crypto then you will get >>>>>>> this error since we cannot tell that it has been done, yet it returns >>>>>>> a >>>>>>> fail if it is already initted. >>>>>>> >>>>>>> Might be worth checking the details of the error. >>>>>>> >>>>>>> Cheers, >>>>>>> Davidm >>>>>>> >>>>>>>>>> David McCullough napisa?(a): >>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>>> Which access library version are you using ? >>>>>>>>>>>> The full name is ixp400accesslibrarywithcrypto-2.3.1 >>>>>>>>>>> Ok, not sure we have tested OCF with version 2.3 of the access >>>>>>>>>>> lib. >>>>>>>>>>> It is part of our tree so I will try it. >>>>>>>>>>> >>>>>>>>>>> Not sure you mentioned which sources you are using, but the >>>>>>>>>>> uClinux-dist or SnapGear dists have very good IXP425 support >>>>>>>>>>> and less patching ;-) >>>>>>>>>>> >>>>>>>>>>>>> Can you load ocf, cryptodev and ixp4xx all with debug enabled: >>>>>>>>>>>>> >>>>>>>>>>>>> modprobe ocf crypto_debug=1 >>>>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 >>>>>>>>>>>>> modprobe ixp4xx ixp_debug=1 >>>>>>>>>>>>> >>>>>>>>>>>>> The run the test, capture all the console output and send me a >>>>>>>>>>>>> copy >>>>>>>>>>>>> for reference. >>>>>>>>>>>> The output is attached (ocf.log). >>>>>>>>>>> Ok, I will try and get some time on it in the next day or so, >>>>>>>>>>> thanks. >>>>>>>>>>> >>>>>>>>>>> Actually, just had a quick look, I think the access lib is >>>>>>>>>>> blowing the >>>>>>>>>>> stack. It is renowned for doing this. >>>>>>>>>>> >>>>>>>>>>> If you can try increasing the kernel stack size to 8K if it isn't >>>>>>>>>>> already it might help. >>>>>>>>>>> >>>>>>>>>>> Otherwise, you may find the info to fix it in our access lib >>>>>>>>>>> patch: >>>>>>>>>>> >>>>>>>>>>> http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh >>>>>>>>>>> >>>>>>>>>>> Or perhaps try the Snapgear/uClinux-dist if you have time. We >>>>>>>>>>> have all >>>>>>>>>>> these sort or problems sorted already ;-) >>>>>>>>>>> >>>>>>>>>>>>> Have you tried turning off preemption ? I don't think I have >>>>>>>>>>>>> ever >>>>>>>>>>>>> tested with that. >>>>>>>>>>>> Yes, I have tried but didn't help :( >>>>>>>>>>> Oh well, looks like a real bug then ;-) >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> Davidm >>>>>>>>>>> >>>>>>>>>>>>>> David McCullough napisa?(a): >>>>>>>>>>>>>>> Jivin Tomasz Rostanski lays it down ... >>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I tried using ixp4xx module for hardware crypto on my ixp425 >>>>>>>>>>>>>>>> device with kernel 2.6.18-rt7 (PREEMPT_DESKTOP). I'm using >>>>>>>>>>>>>>>> ixp400 access library with crypto in version 2.3.1 and >>>>>>>>>>>>>>>> ixp400_eth driver in version 1.6 (with Intel's patch for OCF >>>>>>>>>>>>>>>> support - >>>>>>>>>>>>>>>> http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I'm loading the modules like described in Intel readme: >>>>>>>>>>>>>>>> mknod /dev/crypto c 10 70 >>>>>>>>>>>>>>>> mknod -m 666 /dev/ixNpe c 241 0 >>>>>>>>>>>>>>>> modprobe ixp400 >/dev/null 2>/dev/null >>>>>>>>>>>>>>>> modprobe ixp400_eth >/dev/null 2>/dev/null >>>>>>>>>>>>>>>> modprobe ocf >>>>>>>>>>>>>>>> modprobe cryptodev >>>>>>>>>>>>>>>> modprobe ixp4xx ixp_init_crypto=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Then when I run the: openssl speed -elapsed -evp des-ede3-cbc >>>>>>>>>>>>>>>> -cpu -engine cryptodev the device hangs (I'm using >>>>>>>>>>>>>>>> openssl-0.9.8a patched for OCF). The same happend when I >>>>>>>>>>>>>>>> tried to connect from the device using ssh. >>>>>>>>>>>>>>>> I have enabled debugging and saw that the debugging from >>>>>>>>>>>>>>>> ixp_q_process is the last one displayed. So I have started >>>>>>>>>>>>>>>> adding some debug messages to that function and found that >>>>>>>>>>>>>>>> the hand appears after the following code: >>>>>>>>>>>>>>>> if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) >>>>>>>>>>>>>>>> return; >>>>>>>>>>>>>>>> So I have changed return to goto done and check what will >>>>>>>>>>>>>>>> happen - this time the openssl didn't hang and did it's work. >>>>>>>>>>>>>>>> But the ssh is not working - displays evp_crypt: EVP_Cipher >>>>>>>>>>>>>>>> failed and exits. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I have tried the cryptosoft module instead of ixp4xx and this >>>>>>>>>>>>>>>> one works without any problems, so it seems that some problem >>>>>>>>>>>>>>>> exists in ixp4xx module. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Do you have any clue what could be wrong? I'm almost sure >>>>>>>>>>>>>>>> that someday on older kernel (2.6.12) I got ixp4xx working >>>>>>>>>>>>>>>> without problems. >>>>>>>>>>>>>>> You might want to try incorporating the latest code from the >>>>>>>>>>>>>>> sourceforge >>>>>>>>>>>>>>> site. I haven't seen a like up like you describe on the ixp >>>>>>>>>>>>>>> for a long >>>>>>>>>>>>>>> time and I don't know exactly everything that is in the Intel >>>>>>>>>>>>>>> patches. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Try out the latest download at: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ocf-linux.sourceforge.net >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> and then it will be much easier for me to help you. I run IXP >>>>>>>>>>>>>>> boards >>>>>>>>>>>>>>> here and can easily try some things, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> Davidm >>>>>>>>>>>>>>> > |
From: Albert L. <alb...@gm...> - 2007-09-26 16:09:31
|
I got it to work. For some reason when I compiled openssl, I didn't have the cryptodev.h header in the right place (figured that out compiling the cryptotest tool). The results are again great, but openssl is faster when it uses the padlock driver directly: http://www.docunext.com/resources/mediawiki/index.php/Via_Padlock_OCF-Linux_Integration On 9/26/07, David McCullough <Dav...@se...> wrote: > > Jivin Albert Lash lays it down ... > > I was also wondering if there was any consideration of adding a via > > padlock driver for ocf-linux. Unlike the geode-aes module, the > > padlock-aes doesn't seem to make itself available to the cryptoAPI. > > Hmm, I have used the padlock via cryptoapi for openswan (without OCF). > I would have thought it should work with cryptosoft as well. > > openssl also has a padlock engine as well. > > Checkout > > http://www.logix.cz/michal/devel/padlock/ > > for more info, > > Cheers, > Davidm > > -- > David McCullough, dav...@se..., Ph:+61 734352815 > Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com > -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ |
From: Albert L. <alb...@gm...> - 2007-09-26 16:08:43
|
---------- Forwarded message ---------- From: Albert Lash <alb...@gm...> Date: Sep 26, 2007 12:05 PM Subject: Re: [Ocf-linux-users] openssh link to openssl? To: David McCullough <Dav...@se...> Hi David, If I rmmod cryptodev then it no longer fails. I am using ocf-linux-20070727 patching linux-source-2.6.22. Let me know if there is any more pertinent information I can send. Albert On 9/26/07, David McCullough <Dav...@se...> wrote: > > Jivin Albert Lash lays it down ... > > Hello, > > > > Nice work on ocf-linux. I've got a geode lx800 which has an aes block, > > and the driver automatically makes it available to the linux > > cryptoapi. I've tested with cryptotest and it works with the cryptodev > > module, and I patched openssl-0.9.8e and achieved positive results as > > well. > > > > I have the original openssl shipped with ubuntu in /usr/ssl, and the > > patched version in /usr/local/ssl. Although I read you don't have to > > patch openssh, I assumed you'd have to link it to the patched version > > of openssl. I did so using the most recent version of openssh, and > > configured like so: > > > > ./configure --with-ssl-dir=/usr/local/ssl --with-ssl-engine > > > > It builds fine, but when I try to scp a file I get a corrupted MAC > > error. I can ssh but I do get errors: > > > > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 > > logout > > debug1: channel 0: free: client-session, nchannels 1 > > Connection to 192.168.0.32 closed. > > debug1: Transferred: stdin 0, stdout 0, stderr 36 bytes in 10.1 seconds > > debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 3.6 > > debug1: Exit status 0 > > If you remove /dev/crypto does it still fail ? > > If not then OCF is most likely to blame. Which ocf version are you using ? > Then I can check to see if there are any updates we have made that may > apply to what you are doing :-) > > Cheers, > Davidm > > -- > David McCullough, dav...@se..., Ph:+61 734352815 > Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com > -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ |
From: David M. <Dav...@se...> - 2007-09-26 15:41:00
|
Jivin Albert Lash lays it down ... > Hello, > > Nice work on ocf-linux. I've got a geode lx800 which has an aes block, > and the driver automatically makes it available to the linux > cryptoapi. I've tested with cryptotest and it works with the cryptodev > module, and I patched openssl-0.9.8e and achieved positive results as > well. > > I have the original openssl shipped with ubuntu in /usr/ssl, and the > patched version in /usr/local/ssl. Although I read you don't have to > patch openssh, I assumed you'd have to link it to the patched version > of openssl. I did so using the most recent version of openssh, and > configured like so: > > ./configure --with-ssl-dir=/usr/local/ssl --with-ssl-engine > > It builds fine, but when I try to scp a file I get a corrupted MAC > error. I can ssh but I do get errors: > > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 > logout > debug1: channel 0: free: client-session, nchannels 1 > Connection to 192.168.0.32 closed. > debug1: Transferred: stdin 0, stdout 0, stderr 36 bytes in 10.1 seconds > debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 3.6 > debug1: Exit status 0 If you remove /dev/crypto does it still fail ? If not then OCF is most likely to blame. Which ocf version are you using ? Then I can check to see if there are any updates we have made that may apply to what you are doing :-) Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: David M. <Dav...@se...> - 2007-09-26 15:38:29
|
Jivin Albert Lash lays it down ... > I was also wondering if there was any consideration of adding a via > padlock driver for ocf-linux. Unlike the geode-aes module, the > padlock-aes doesn't seem to make itself available to the cryptoAPI. Hmm, I have used the padlock via cryptoapi for openswan (without OCF). I would have thought it should work with cryptosoft as well. openssl also has a padlock engine as well. Checkout http://www.logix.cz/michal/devel/padlock/ for more info, Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |
From: Albert L. <alb...@gm...> - 2007-09-26 15:03:33
|
I was also wondering if there was any consideration of adding a via padlock driver for ocf-linux. Unlike the geode-aes module, the padlock-aes doesn't seem to make itself available to the cryptoAPI. - Albert -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ |
From: Albert L. <alb...@gm...> - 2007-09-26 14:52:15
|
Hello, Nice work on ocf-linux. I've got a geode lx800 which has an aes block, and the driver automatically makes it available to the linux cryptoapi. I've tested with cryptotest and it works with the cryptodev module, and I patched openssl-0.9.8e and achieved positive results as well. I have the original openssl shipped with ubuntu in /usr/ssl, and the patched version in /usr/local/ssl. Although I read you don't have to patch openssh, I assumed you'd have to link it to the patched version of openssl. I did so using the most recent version of openssh, and configured like so: ./configure --with-ssl-dir=/usr/local/ssl --with-ssl-engine It builds fine, but when I try to scp a file I get a corrupted MAC error. I can ssh but I do get errors: debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 logout debug1: channel 0: free: client-session, nchannels 1 Connection to 192.168.0.32 closed. debug1: Transferred: stdin 0, stdout 0, stderr 36 bytes in 10.1 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 3.6 debug1: Exit status 0 Any ideas? Thanks, Albert -- My Blogs: http://www.docunext.com/ http://www.albertlash.com/ |
From: David M. <Dav...@se...> - 2007-09-26 14:30:03
|
Jivin Tomasz Rostanski lays it down ... > Hi, > > Did you have a chance to try the intel's ixp400 library newer than 2.1? > Few days ago Intel has released version 3.0 of this lib. The versions > prior to 2.4 was removed from main download page > (http://www.intel.com/design/network/products/npfamily/download_ixp400.htm); Ok, we haven't imported 2.4 yet. I tried it with 2.1 just now and it works as expected. The latest I can try with easily is 2.3. Do you have that ? I believe we have 2.4 going into our tree very soon now (week or so) so I can try it then. Cheers, Davidm > David McCullough pisze: > >Jivin Tomasz Rostanski lays it down ... > >>Hi, > >> > >>It seems that the crypto_done is never been called, so the loop is > >>waiting infinitive and the device freezes. > >>So it definitelly could as you have described. However I have checked > >>the function ixCryptoAccAuthCryptPerform to see if it has changed since > >>2.0 version of the library but is exactly the same. > >>I'll try to find what are the differences in crypto part of the library > >>- maybe there I will find the clue. > > > >Lets hope. We have 2.1 running here (not sure if thats in your tree or > >not). It seems to be behaving so far. Mostly IXP465 testing though. > > > >>btw. The ixpCryptoAccCtxRegister failed 6 error I got when I tried to > >>run this on another board - I have returned to my current one ;) > > > >Ok, best I can tell, 6 = ALG unsupported, which doesn't really make > >sense, but perhaps that helps you. You can find the enum (grrr enum > >errors) in: > > > > ixp400-1.4/ixp400_xscale_sw/src/include/IxCryptoAcc.h > > > >Cheers, > >Davidm > > > >>David McCullough wrote: > >>>Jivin Tomasz Rostanski lays it down ... > >>>>Hi, > >>>> > >>>>I have debug the code a bit and found where the freeze is. > >>>>The waiting code in cryptodev_op is never ending from the while loop: > >>>>do { > >>>> wait_event_interruptible(...); > >>>>} while ((crp->crp_flags & CRYPTO_F_DONE) == 0); > >>>> > >>>>When I set the rp->crp_flags to CRYPTO_F_DONE in ixp_q_process before > >>>>return when status equals to IX_CRYPTO_ACC_STATUS_SUCCESS the freeze is > >>>>not happening. > >>>>So maybe there is something is wrong with wait_event_interruptible > >>>>function in my kernel or I don't know. > >>> > >>>We have seen something like this just recently. A hash of a 0 length > >>>buffer would cause an error and the access lib would not report it, or > >>>call the callback. > >>> > >>>Any chance you are doing something like this ? > >>> > >>>Setting CRYPTO_F_DONE in ixp_q_process when you get a > >>>IX_CRYPTO_ACC_STATUS_SUCCESS is not good, you will be returning before > >>>the operation is completed. > >>> > >>>CRYPTO_F_DONE is set by the call to crypto_done, which happens on error > >>>or when the callback occurs. > >>> > >>>I am guessing you are past this error as well: > >>> > >>> "ixpCryptoAccCtxRegister failed 6" > >>> > >>>Cheers, > >>>Davidm > >>> > >>> > >>>>David McCullough napisa?(a): > >>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>Hi, > >>>>>> > >>>>>>>>I have checked the latest ixp400 access lib (2.4) and ixp_400 > >>>>>>>>ethernet driver (1.7). I didn't use the Intel patches for crypto > >>>>>>>>initialization in ixp400_eth. > >>>>>>>>The result is still the same - the device freezes when I run > >>>>>>>>openssl or ssh. > >>>>>>>>I'm having microcode compiled in driver - load it from file to > >>>>>>>>/dev/ixNpe, so I have recompiled it and load the microcode from > >>>>>>>>file but this didn't make any difference. > >>>>>>>Are you using the "crypto version" of the access library ? > >>>>>>Yes, I'm using the crypto version of the library. > >>>>>> > >>>>>>>>Could this issue be related with the hardware? I'm using the > >>>>>>>>AirTegrity box which was designed completely by them and not uses > >>>>>>>>redboot bootloader but their own one. Could it be the reason of the > >>>>>>>>problem I'm having? > >>>>>>>No, we do the same, it has no bearing on how the NPE's do their > >>>>>>>thing. > >>>>>>> > >>>>>>>Are you loading the correct NPE code (with crypto support etc). > >>>>>>Normally I have NPE code compiled in the sources. I'm using the > >>>>>>version with crypto support so it should be ok. > >>>>>ok. > >>>>> > >>>>>>>>I'll give a try on Gateworks GW2347 and see if it will be working > >>>>>>>>as it should or not. > >>>>>>Ok, I have a problem with initialization crypto on the gw2347 - the > >>>>>>message: > >>>>>>"ixpCryptoAccCtxRegister failed 6" appears when I run openssl - I > >>>>>>have > >>>>>Thats sounds weird. It sounds like the crypto isn't working properly > >>>>>for some reason. > >>>>> > >>>>>ixpCryptoAccCtxRegister doesn't need much to work. > >>>>> > >>>>>>checked and the ixp4xx module when loading returns the error that > >>>>>>cannot initialize crypto. > >>>>>That is ok, if the network driver init's the crypto then you will get > >>>>>this error since we cannot tell that it has been done, yet it returns > >>>>>a > >>>>>fail if it is already initted. > >>>>> > >>>>>Might be worth checking the details of the error. > >>>>> > >>>>>Cheers, > >>>>>Davidm > >>>>> > >>>>>>>>David McCullough napisa?(a): > >>>>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>>Hi, > >>>>>>>>>> > >>>>>>>>>>>Which access library version are you using ? > >>>>>>>>>>The full name is ixp400accesslibrarywithcrypto-2.3.1 > >>>>>>>>>Ok, not sure we have tested OCF with version 2.3 of the access > >>>>>>>>>lib. > >>>>>>>>>It is part of our tree so I will try it. > >>>>>>>>> > >>>>>>>>>Not sure you mentioned which sources you are using, but the > >>>>>>>>>uClinux-dist or SnapGear dists have very good IXP425 support > >>>>>>>>>and less patching ;-) > >>>>>>>>> > >>>>>>>>>>>Can you load ocf, cryptodev and ixp4xx all with debug enabled: > >>>>>>>>>>> > >>>>>>>>>>> modprobe ocf crypto_debug=1 > >>>>>>>>>>> modprobe cryptodev cryptodev_debug=1 > >>>>>>>>>>> modprobe ixp4xx ixp_debug=1 > >>>>>>>>>>> > >>>>>>>>>>>The run the test, capture all the console output and send me a > >>>>>>>>>>>copy > >>>>>>>>>>>for reference. > >>>>>>>>>>The output is attached (ocf.log). > >>>>>>>>>Ok, I will try and get some time on it in the next day or so, > >>>>>>>>>thanks. > >>>>>>>>> > >>>>>>>>>Actually, just had a quick look, I think the access lib is > >>>>>>>>>blowing the > >>>>>>>>>stack. It is renowned for doing this. > >>>>>>>>> > >>>>>>>>>If you can try increasing the kernel stack size to 8K if it isn't > >>>>>>>>>already it might help. > >>>>>>>>> > >>>>>>>>>Otherwise, you may find the info to fix it in our access lib > >>>>>>>>>patch: > >>>>>>>>> > >>>>>>>>> http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > >>>>>>>>> > >>>>>>>>>Or perhaps try the Snapgear/uClinux-dist if you have time. We > >>>>>>>>>have all > >>>>>>>>>these sort or problems sorted already ;-) > >>>>>>>>> > >>>>>>>>>>>Have you tried turning off preemption ? I don't think I have > >>>>>>>>>>>ever > >>>>>>>>>>>tested with that. > >>>>>>>>>>Yes, I have tried but didn't help :( > >>>>>>>>>Oh well, looks like a real bug then ;-) > >>>>>>>>> > >>>>>>>>>Cheers, > >>>>>>>>>Davidm > >>>>>>>>> > >>>>>>>>>>>>David McCullough napisa?(a): > >>>>>>>>>>>>>Jivin Tomasz Rostanski lays it down ... > >>>>>>>>>>>>>>Hi, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>I tried using ixp4xx module for hardware crypto on my ixp425 > >>>>>>>>>>>>>>device with kernel 2.6.18-rt7 (PREEMPT_DESKTOP). I'm using > >>>>>>>>>>>>>>ixp400 access library with crypto in version 2.3.1 and > >>>>>>>>>>>>>>ixp400_eth driver in version 1.6 (with Intel's patch for OCF > >>>>>>>>>>>>>>support - > >>>>>>>>>>>>>>http://downloadcenter.intel.com/detail_desc.aspx?ProductID=2100&DwnldID=11266&agr=Y). > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>I'm loading the modules like described in Intel readme: > >>>>>>>>>>>>>>mknod /dev/crypto c 10 70 > >>>>>>>>>>>>>>mknod -m 666 /dev/ixNpe c 241 0 > >>>>>>>>>>>>>>modprobe ixp400 >/dev/null 2>/dev/null > >>>>>>>>>>>>>>modprobe ixp400_eth >/dev/null 2>/dev/null > >>>>>>>>>>>>>>modprobe ocf > >>>>>>>>>>>>>>modprobe cryptodev > >>>>>>>>>>>>>>modprobe ixp4xx ixp_init_crypto=0 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>Then when I run the: openssl speed -elapsed -evp des-ede3-cbc > >>>>>>>>>>>>>>-cpu -engine cryptodev the device hangs (I'm using > >>>>>>>>>>>>>>openssl-0.9.8a patched for OCF). The same happend when I > >>>>>>>>>>>>>>tried to connect from the device using ssh. > >>>>>>>>>>>>>>I have enabled debugging and saw that the debugging from > >>>>>>>>>>>>>>ixp_q_process is the last one displayed. So I have started > >>>>>>>>>>>>>>adding some debug messages to that function and found that > >>>>>>>>>>>>>>the hand appears after the following code: > >>>>>>>>>>>>>>if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) > >>>>>>>>>>>>>> return; > >>>>>>>>>>>>>>So I have changed return to goto done and check what will > >>>>>>>>>>>>>>happen - this time the openssl didn't hang and did it's work. > >>>>>>>>>>>>>>But the ssh is not working - displays evp_crypt: EVP_Cipher > >>>>>>>>>>>>>>failed and exits. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>I have tried the cryptosoft module instead of ixp4xx and this > >>>>>>>>>>>>>>one works without any problems, so it seems that some problem > >>>>>>>>>>>>>>exists in ixp4xx module. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>Do you have any clue what could be wrong? I'm almost sure > >>>>>>>>>>>>>>that someday on older kernel (2.6.12) I got ixp4xx working > >>>>>>>>>>>>>>without problems. > >>>>>>>>>>>>>You might want to try incorporating the latest code from the > >>>>>>>>>>>>>sourceforge > >>>>>>>>>>>>>site. I haven't seen a like up like you describe on the ixp > >>>>>>>>>>>>>for a long > >>>>>>>>>>>>>time and I don't know exactly everything that is in the Intel > >>>>>>>>>>>>>patches. > >>>>>>>>>>>>> > >>>>>>>>>>>>>Try out the latest download at: > >>>>>>>>>>>>> > >>>>>>>>>>>>> ocf-linux.sourceforge.net > >>>>>>>>>>>>> > >>>>>>>>>>>>>and then it will be much easier for me to help you. I run IXP > >>>>>>>>>>>>>boards > >>>>>>>>>>>>>here and can easily try some things, > >>>>>>>>>>>>> > >>>>>>>>>>>>>Cheers, > >>>>>>>>>>>>>Davidm > >>>>>>>>>>>>> > > > -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |