Thread: Re: [Ocf-linux-users] About OCF Linux
Brought to you by:
david-m
From: David M. <Dav...@se...> - 2007-08-31 03:45:07
|
Jivin carl zhu lays it down ... > Hi David, > > I have got your OCF linux code, but I have some question about it. > because source forge's mail list seems no one to answer. I send the mail to > you. I have not seen any mailing list mails or "pending" messages. Are you sending to the correct address ? You should subscribe before mailing to get a better response time. > the questions are: > 1, I use ocf-bench, get such result: > Using /lib/modules/2.4.32-uc0/kernel/ocf/ocf-bench.o > Crypto Speed tests > OCF: testing ... > OCF: 1044 requests of 1500 bytes in 17 jiffies > IXP: testing ... > IXP: 1044 requests of 1500 bytes in 13 jiffies > lsmod's result: > Module Size Used by > ixp4xx 5672 0 (unused) > cryptodev 5868 0 (unused) > ocf 15616 0 [ixp4xx cryptodev] > ixp425_eth 16700 2 > ixp400 412032 0 [ixp4xx ixp425_eth] > But I use openswan to build the VPN, the tcp throughput will be 3 Mbps, > if not use VPN, the throughput will be 70Mbps. > I dont know why? I think I can get 40-50Mbps in VPN... On an IXP you should get from 38-45Mbps depening on clock speed etc. 3Mbps is slow even for software crypto. Make sure you do not have cryptosoft loaded. > 2, Due to problem 1, I think the root cause may happened on OCF crypto API > with Openswan, but I can't find any document to discuss it. Do you have > some? Most likely you have openswan configured incorrectly. Check that CONFIG_KLIPS_OCF is enabled in the kernel build. Run "cryptotest" and check the throughput. If everything look accelerated, then you need to work out what is wrong with your openswan build/compile that is not enabled OCF support. 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-08-31 11:26:35
|
Jivin carl zhu lays it down ... > Hi David, > > Glad to find you response so quickly.:) > Do you work for Snapgear? Yes. > I use snapgear v3.4 and ixp csr 1.4 with That is what we use. > crypto to build the code. My device is ADI Coyote like. > I just get the code and patch the driver to let it use ethernet/crypto. Did you use the snapgear CSR patch ? http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh Do you do a make config and enable OCF and the appropriate modules ? > Then I get such performance.(openswan + linux2.4.x) So are you now getting full performance or not ? If not, send me a copy these files and I should be able to sort it out. snapgear/linux-2.4.x/.config snapgear/modules/.config snapgear/config/.config Cheers. Davidm > On 8/31/07, David McCullough <Dav...@se...> wrote: > > > > > > Jivin carl zhu lays it down ... > > > Hi David, > > > > > > I have got your OCF linux code, but I have some question about it. > > > because source forge's mail list seems no one to answer. I send the mail > > to > > > you. > > > > I have not seen any mailing list mails or "pending" messages. Are you > > sending to the correct address ? You should subscribe before mailing > > to get a better response time. > > > > > the questions are: > > > 1, I use ocf-bench, get such result: > > > Using /lib/modules/2.4.32-uc0/kernel/ocf/ocf-bench.o > > > Crypto Speed tests > > > OCF: testing ... > > > OCF: 1044 requests of 1500 bytes in 17 jiffies > > > IXP: testing ... > > > IXP: 1044 requests of 1500 bytes in 13 jiffies > > > lsmod's result: > > > Module Size Used by > > > ixp4xx 5672 0 (unused) > > > cryptodev 5868 0 (unused) > > > ocf 15616 0 [ixp4xx cryptodev] > > > ixp425_eth 16700 2 > > > ixp400 412032 0 [ixp4xx ixp425_eth] > > > But I use openswan to build the VPN, the tcp throughput will be 3 > > Mbps, > > > if not use VPN, the throughput will be 70Mbps. > > > I dont know why? I think I can get 40-50Mbps in VPN... > > > > On an IXP you should get from 38-45Mbps depening on clock speed etc. > > > > 3Mbps is slow even for software crypto. Make sure you do not have > > cryptosoft loaded. > > > > > 2, Due to problem 1, I think the root cause may happened on OCF crypto > > API > > > with Openswan, but I can't find any document to discuss it. Do you have > > > some? > > > > Most likely you have openswan configured incorrectly. Check that > > CONFIG_KLIPS_OCF is enabled in the kernel build. > > > > Run "cryptotest" and check the throughput. If everything look > > accelerated, then you need to work out what is wrong with your openswan > > build/compile that is not enabled OCF support. > > > > 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-09-03 06:46:18
|
Hi Carl, Ok, there are some bits missing from the openswan in your source tree when using snapgear-3.4. edit snapgear/linux-2.4.x/net/ipsec/Makefile, add the following to the first instance of EXTRA_CFLAGS: -I$(ROOTDIR)/modules/ocf edit snapgear/openswan/linux/net/ipsec/Config.in.os2_4, add the following line after the CONFIG_KLIPS_DEBUG line near the end. bool ' IPsec: OCF HW Acceleration support' CONFIG_KLIPS_OCF That should get you going. To rebuild do: make clean make oldconfig (answer y to KLIPS_OCF) make dep make See if that fixes it, if not let me know and I sort it out, Cheers, Davidm Jivin carl zhu lays it down ... > here you are, I have attached. > > On 8/31/07, David McCullough <Dav...@se...> wrote: > > > > > > Jivin carl zhu lays it down ... > > > Hi David, > > > > > > Glad to find you response so quickly.:) > > > Do you work for Snapgear? > > > > Yes. > > > > > I use snapgear v3.4 and ixp csr 1.4 with > > > > That is what we use. > > > > > crypto to build the code. My device is ADI Coyote like. > > > I just get the code and patch the driver to let it use > > ethernet/crypto. > > > > Did you use the snapgear CSR patch ? > > > > > > http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > > > > Do you do a make config and enable OCF and the appropriate modules ? > > > > > Then I get such performance.(openswan + linux2.4.x) > > > > So are you now getting full performance or not ? > > > > If not, send me a copy these files and I should be able to sort it out. > > > > snapgear/linux-2.4.x/.config > > snapgear/modules/.config > > snapgear/config/.config > > > > Cheers. > > Davidm > > > > > On 8/31/07, David McCullough <Dav...@se...> > > wrote: > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > Hi David, > > > > > > > > > > I have got your OCF linux code, but I have some question about > > it. > > > > > because source forge's mail list seems no one to answer. I send the > > mail > > > > to > > > > > you. > > > > > > > > I have not seen any mailing list mails or "pending" messages. Are you > > > > sending to the correct address ? You should subscribe before mailing > > > > to get a better response time. > > > > > > > > > the questions are: > > > > > 1, I use ocf-bench, get such result: > > > > > Using /lib/modules/2.4.32-uc0/kernel/ocf/ocf-bench.o > > > > > Crypto Speed tests > > > > > OCF: testing ... > > > > > OCF: 1044 requests of 1500 bytes in 17 jiffies > > > > > IXP: testing ... > > > > > IXP: 1044 requests of 1500 bytes in 13 jiffies > > > > > lsmod's result: > > > > > Module Size Used by > > > > > ixp4xx 5672 0 (unused) > > > > > cryptodev 5868 0 (unused) > > > > > ocf 15616 0 [ixp4xx cryptodev] > > > > > ixp425_eth 16700 2 > > > > > ixp400 412032 0 [ixp4xx ixp425_eth] > > > > > But I use openswan to build the VPN, the tcp throughput will be 3 > > > > Mbps, > > > > > if not use VPN, the throughput will be 70Mbps. > > > > > I dont know why? I think I can get 40-50Mbps in VPN... > > > > > > > > On an IXP you should get from 38-45Mbps depening on clock speed etc. > > > > > > > > 3Mbps is slow even for software crypto. Make sure you do not have > > > > cryptosoft loaded. > > > > > > > > > 2, Due to problem 1, I think the root cause may happened on OCF > > crypto > > > > API > > > > > with Openswan, but I can't find any document to discuss it. Do you > > have > > > > > some? > > > > > > > > Most likely you have openswan configured incorrectly. Check that > > > > CONFIG_KLIPS_OCF is enabled in the kernel build. > > > > > > > > Run "cryptotest" and check the throughput. If everything look > > > > accelerated, then you need to work out what is wrong with your > > openswan > > > > build/compile that is not enabled OCF support. > > > > > > > > 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 > > -- 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-11 06:11:11
|
Jivin Carl Zhu lays it down ... > Still have the same problem, I try to use 2.1.1 now, but the buildutil > directory have no envirment file. > > I am waiting for buildutil directry file now. > > Thanks for your help, after I get the file and still have problem, I will > contact you. Ok. > BTW,can you give me some OCF document? I still have intrest with it's API to > Linux and Openswan. There is no documentation other than the code abd what is referenced on the website at: http://ocf-linux.sourceforge.net/links.html Cheers, Davidm > 2007/9/5, David McCullough <Dav...@se...>: > > > > > > Jivin Carl Zhu lays it down ... > > > Sorry!!!! > > > > > > I have found I am using 3.5 now. > > > So this problem may related to this? > > > > May, don't worry about the ipsec_alg_cryptoapi.c, it looks ok. > > Do a clean and full rebuild: > > > > patch your tree if you haven't > > make clean > > make oldconfig > > (answer yes to appropriate OCF questions) > > make dep > > make > > > > If you get errors send them to me so I can see what is failing, > > > > Cheers, > > Davidm > > > > > 2007/9/5, David McCullough <Dav...@se...>: > > > > > > > > > > > > Which snapgear version do you have, this patch was for snapgear 3.4 > > > > > > > > Jivin Carl Zhu lays it down ... > > > > > I have checked your patch file. > > > > > > > > > > One file can't be patched and I have found it seems that we use > > > > different > > > > > file? > > > > > > > > > > The file is:snapgear\openswan\linux\net\ipsec\ipsec_alg_cryptoapi.c > > > > > I attached it, can you check it why? > > > > > > > > > > > > > > > 2007/9/4, David McCullough <Dav...@se...>: > > > > > > > > > > > > > > > > > > Have a try with the attached patch. > > > > > > I would normally use CSR 1.4 with 2.4 kernels. > > > > > > There are a few things missing from the snapgear-3.4 tree to get > > this > > > > > > going and I have just managed to get another user running, so it > > can > > > > be > > > > > > done. This patch seems to finish it off :-) > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > I still have the same result.... > > > > > > > > > > > > > > I think I may need redownload the snapgear code and use CSR2.1.1 > > , > > > > Does > > > > > > this > > > > > > > will solve the problem? > > > > > > > > > > > > > > > > > > > > > On 9/3/07, David McCullough < > > Dav...@se...> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > > > Hi David, > > > > > > > > > > > > > > > > > > Sorry to bother you again. > > > > > > > > > > > > > > > > > > I have tried your suggestions but faced complie error(in > > > > error.txt > > > > > > ),I > > > > > > > > also > > > > > > > > > attached what I changed in config.in.rar > > > > > > > > > > > > > > > > You should build ipsec as a module when using OCF as a > > module, as > > > > > > ipsec > > > > > > > > with OCF support enabled relies on OCF being present. In the > > > > snapgear > > > > > > > > build env, ocf is always a module, so ipsec needs to be a > > > > module. > > > > > > > > > > > > > > > > Do the following: > > > > > > > > > > > > > > > > make linux-2.4.x_clean > > > > > > > > > > > > > > > > edit snapgear/linux-2.4.x/.config > > > > > > > > > > > > > > > > change CONFIG_KLIPS_OCF=y to CONFIG_KLIPS_OCF=m > > > > > > > > > > > > > > > > run > > > > > > > > > > > > > > > > make oldconfig > > > > > > > > make dep > > > > > > > > make > > > > > > > > > > > > > > > > See how that goes :-) > > > > > > > > > > > > > > > > > After check the ocf/README, I find this information: > > > > > > > > > > > > > > > > > > * make sure that cryptodev.h (from ocf-linux.tar.gz) is > > > > > > installed as > > > > > > > > > crypto/cryptodev.h in an include directory that is > > used > > > > for > > > > > > > > building > > > > > > > > > applications for your platform. For example on a host > > > > system > > > > > > that > > > > > > > > > might be: > > > > > > > > > > > > > > > > > > /usr/include/crypto/cryptodev.h > > > > > > > > > > > > > > > > > > Now, I just change the > > > > > > snapgear\openswan\linux\net\ipsec\ipsec_ocf.h's > > > > > > > > > cryptodev.h to correct path. Does this not right? How I need > > to > > > > do? > > > > > > > > > > > > > > > > The addition of the: > > > > > > > > > > > > > > > > -I$(ROOTDIR)/modules/ocf > > > > > > > > > > > > > > > > in the snapgear/linux-2.4.x/net/ipsec/Makefile file should > > have > > > > been > > > > > > > > enough to fix and include errors. > > > > > > > > > > > > > > > > Cheers, > > > > > > > > Davidm > > > > > > > > > > > > > > > > > On 9/3/07, David McCullough < > > > > Dav...@se...> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Carl, > > > > > > > > > > > > > > > > > > > > Ok, there are some bits missing from the openswan in your > > > > source > > > > > > tree > > > > > > > > > > when using snapgear-3.4. > > > > > > > > > > > > > > > > > > > > edit snapgear/linux-2.4.x/net/ipsec/Makefile, add > > the > > > > > > following > > > > > > > > to > > > > > > > > > > the > > > > > > > > > > first instance of EXTRA_CFLAGS: > > > > > > > > > > > > > > > > > > > > -I$(ROOTDIR)/modules/ocf > > > > > > > > > > > > > > > > > > > > edit > > > > > > snapgear/openswan/linux/net/ipsec/Config.in.os2_4, add > > > > > > > > the > > > > > > > > > > following line after the CONFIG_KLIPS_DEBUG line > > near > > > > the > > > > > > end. > > > > > > > > > > > > > > > > > > > > bool ' IPsec: OCF HW Acceleration > > support' > > > > > > > > > > CONFIG_KLIPS_OCF > > > > > > > > > > > > > > > > > > > > That should get you going. To rebuild do: > > > > > > > > > > > > > > > > > > > > make clean > > > > > > > > > > make oldconfig > > > > > > > > > > (answer y to KLIPS_OCF) > > > > > > > > > > make dep > > > > > > > > > > make > > > > > > > > > > > > > > > > > > > > See if that fixes it, if not let me know and I sort it > > out, > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > Davidm > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > > > > > here you are, I have attached. > > > > > > > > > > > > > > > > > > > > > > On 8/31/07, David McCullough < > > > > > > Dav...@se...> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > > > > > > > Hi David, > > > > > > > > > > > > > > > > > > > > > > > > > > Glad to find you response so quickly.:) > > > > > > > > > > > > > Do you work for Snapgear? > > > > > > > > > > > > > > > > > > > > > > > > Yes. > > > > > > > > > > > > > > > > > > > > > > > > > I use snapgear v3.4 and ixp csr 1.4 with > > > > > > > > > > > > > > > > > > > > > > > > That is what we use. > > > > > > > > > > > > > > > > > > > > > > > > > crypto to build the code. My device is ADI Coyote > > like. > > > > > > > > > > > > > I just get the code and patch the driver to let > > it > > > > use > > > > > > > > > > > > ethernet/crypto. > > > > > > > > > > > > > > > > > > > > > > > > Did you use the snapgear CSR patch ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > > > > > > > > > > > > > > > > > > > > > > > > Do you do a make config and enable OCF and the > > appropriate > > > > > > modules > > > > > > > > ? > > > > > > > > > > > > > > > > > > > > > > > > > Then I get such performance.(openswan + linux2.4.x) > > > > > > > > > > > > > > > > > > > > > > > > So are you now getting full performance or not ? > > > > > > > > > > > > > > > > > > > > > > > > If not, send me a copy these files and I should be > > able > > > > to > > > > > > sort > > > > > > > > it > > > > > > > > > > out. > > > > > > > > > > > > > > > > > > > > > > > > snapgear/linux-2.4.x/.config > > > > > > > > > > > > snapgear/modules/.config > > > > > > > > > > > > snapgear/config/.config > > > > > > > > > > > > > > > > > > > > > > > > Cheers. > > > > > > > > > > > > Davidm > > > > > > > > > > > > > > > > > > > > > > > > > On 8/31/07, David McCullough < > > > > > > > > Dav...@se...> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > > > > > > > > > Hi David, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have got your OCF linux code, but I have > > some > > > > > > question > > > > > > > > > > about > > > > > > > > > > > > it. > > > > > > > > > > > > > > > because source forge's mail list seems no one to > > > > answer. > > > > > > I > > > > > > > > send > > > > > > > > > > the > > > > > > > > > > > > mail > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > you. > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have not seen any mailing list mails or > > "pending" > > > > > > > > messages. Are > > > > > > > > > > you > > > > > > > > > > > > > > sending to the correct address ? You should > > subscribe > > > > > > before > > > > > > > > > > mailing > > > > > > > > > > > > > > to get a better response time. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the questions are: > > > > > > > > > > > > > > > 1, I use ocf-bench, get such result: > > > > > > > > > > > > > > > Using /lib/modules/2.4.32-uc0/kernel/ocf/ocf- > > bench.o > > > > > > > > > > > > > > > Crypto Speed tests > > > > > > > > > > > > > > > OCF: testing ... > > > > > > > > > > > > > > > OCF: 1044 requests of 1500 bytes in 17 jiffies > > > > > > > > > > > > > > > IXP: testing ... > > > > > > > > > > > > > > > IXP: 1044 requests of 1500 bytes in 13 jiffies > > > > > > > > > > > > > > > lsmod's result: > > > > > > > > > > > > > > > Module Size Used by > > > > > > > > > > > > > > > ixp4xx 5672 0 (unused) > > > > > > > > > > > > > > > cryptodev 5868 0 (unused) > > > > > > > > > > > > > > > ocf 15616 0 [ixp4xx > > cryptodev] > > > > > > > > > > > > > > > ixp425_eth 16700 2 > > > > > > > > > > > > > > > ixp400 412032 0 [ixp4xx > > ixp425_eth] > > > > > > > > > > > > > > > But I use openswan to build the VPN, the tcp > > > > > > throughput > > > > > > > > will > > > > > > > > > > be 3 > > > > > > > > > > > > > > Mbps, > > > > > > > > > > > > > > > if not use VPN, the throughput will be 70Mbps. > > > > > > > > > > > > > > > I dont know why? I think I can get 40-50Mbps > > in > > > > > > VPN... > > > > > > > > > > > > > > > > > > > > > > > > > > > > On an IXP you should get from 38-45Mbps depening > > on > > > > clock > > > > > > > > speed > > > > > > > > > > etc. > > > > > > > > > > > > > > > > > > > > > > > > > > > > 3Mbps is slow even for software crypto. Make sure > > you > > > > do > > > > > > not > > > > > > > > have > > > > > > > > > > > > > > cryptosoft loaded. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2, Due to problem 1, I think the root cause may > > > > > > happened on > > > > > > > > OCF > > > > > > > > > > > > crypto > > > > > > > > > > > > > > API > > > > > > > > > > > > > > > with Openswan, but I can't find any document to > > > > discuss > > > > > > it. > > > > > > > > Do > > > > > > > > > > you > > > > > > > > > > > > have > > > > > > > > > > > > > > > some? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Most likely you have openswan configured > > > > > > incorrectly. Check > > > > > > > > that > > > > > > > > > > > > > > CONFIG_KLIPS_OCF is enabled in the kernel build. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Run "cryptotest" and check the throughput. If > > > > everything > > > > > > look > > > > > > > > > > > > > > accelerated, then you need to work out what is > > wrong > > > > with > > > > > > > > your > > > > > > > > > > > > openswan > > > > > > > > > > > > > > build/compile that is not enabled OCF support. > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > David McCullough, dav...@se..., > > > > Ph:+61 > > > > > > > > > > 734352815 > > > > > > > > > > Secure Computing - SnapGear http://www.uCdot.org > > > > > > > > > > http://www.cyberguard.com > > > > > > > > > > > > > > > > > > > > > > > > > > > make CFLAGS="-D__KERNEL__ -I/home/carl_zhu/snapgear/linux- > > 2.4.x > > > > > > /include -Wall > > > > > > > > -Wstrict-prototypes -Wno-trigraphs -O -fno-strict-aliasing > > > > -fno-common > > > > > > -Uarm > > > > > > > > -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=5 > > -mcpu=xscale > > > > > > > > -mtune=xscale -malignment-traps -msoft-float -Uarm " > > > > > > > > -C /home/carl_zhu/snapgear/modules > > > > > > > > > make[2]: Entering directory > > `/home/carl_zhu/snapgear/modules' > > > > > > > > > make all_targets > > > > > > > > > make[3]: Entering directory > > `/home/carl_zhu/snapgear/modules' > > > > > > > > > make[3]: Nothing to be done for `all_targets'. > > > > > > > > > make[3]: Leaving directory `/home/carl_zhu/snapgear/modules' > > > > > > > > > make[2]: Leaving directory `/home/carl_zhu/snapgear/modules' > > > > > > > > > arm-linux-ld -EB -p -X -T arch/arm/vmlinux.lds > > > > arch/arm/kernel/head- > > > > > > > > armv.o arch/arm/kernel/init_task.o init/main.o init/version.o > > > > > > > > init/do_mounts.o \ > > > > > > > > > --start-group \ > > > > > > > > > arch/arm/kernel/kernel.o arch/arm/mm/mm.o > > > > > > > > arch/arm/mach-ixp425/ixp425.o kernel/kernel.o mm/mm.o fs/fs.o > > > > > > ipc/ipc.o \ > > > > > > > > > drivers/char/char.o drivers/serial/serial.o > > > > > > > > drivers/block/block.o drivers/misc/misc.o drivers/net/net.o > > > > > > > > drivers/pci/driver.o drivers/mtd/mtdlink.o > > drivers/media/media.o > > > > > > > > crypto/crypto.o \ > > > > > > > > > net/network.o \ > > > > > > > > > arch/arm/nwfpe/math-emu.o arch/arm/lib/lib.a > > > > > > > > /home/carl_zhu/snapgear/linux-2.4.x/lib/lib.a \ > > > > > > > > > --end-group \ > > > > > > > > > -o vmlinux > > > > > > > > > net/network.o: In function `ipsec_ocf_sa_init': > > > > > > > > > sysctl_net.c:(.text+0x8a264): undefined reference to > > > > > > `crypto_newsession' > > > > > > > > > sysctl_net.c:(.text+0x8a284): undefined reference to > > > > > > `crypto_newsession' > > > > > > > > > sysctl_net.c:(.text+0x8a2a4): undefined reference to > > > > > > `crypto_newsession' > > > > > > > > > net/network.o: In function `ipsec_ocf_sa_free': > > > > > > > > > sysctl_net.c:(.text+0x8a35c): undefined reference to > > > > > > > > `crypto_freesession' > > > > > > > > > net/network.o: In function `ipsec_ocf_rcv_cb': > > > > > > > > > sysctl_net.c:(.text+0x8a4b4): undefined reference to > > > > > > `crypto_freereq' > > > > > > > > > net/network.o: In function `ipsec_ocf_rcv': > > > > > > > > > sysctl_net.c:(.text+0x8a60c): undefined reference to > > > > `crypto_getreq' > > > > > > > > > sysctl_net.c:(.text+0x8a884): undefined reference to > > > > > > `crypto_dispatch' > > > > > > > > > net/network.o: In function `ipsec_ocf_xmit_cb': > > > > > > > > > sysctl_net.c:(.text+0x8a98c): undefined reference to > > > > > > `crypto_freereq' > > > > > > > > > net/network.o: In function `ipsec_ocf_xmit': > > > > > > > > > sysctl_net.c:(.text+0x8aae0): undefined reference to > > > > `crypto_getreq' > > > > > > > > > sysctl_net.c:(.text+0x8ad2c): undefined reference to > > > > > > `crypto_dispatch' > > > > > > > > > net/network.o: In function `ipsec_ocf_check_alg': > > > > > > > > > sysctl_net.c:(.text+0x8adb4): undefined reference to > > > > > > `crypto_newsession' > > > > > > > > > sysctl_net.c:(.text+0x8ade8): undefined reference to > > > > > > > > `crypto_freesession' > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > 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 > > -- 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-03 17:13:17
|
Jivin carl zhu lays it down ... > Hi David, > > Sorry to bother you again. > > I have tried your suggestions but faced complie error(in error.txt),I also > attached what I changed in config.in.rar You should build ipsec as a module when using OCF as a module, as ipsec with OCF support enabled relies on OCF being present. In the snapgear build env, ocf is always a module, so ipsec needs to be a module. Do the following: make linux-2.4.x_clean edit snapgear/linux-2.4.x/.config change CONFIG_KLIPS_OCF=y to CONFIG_KLIPS_OCF=m run make oldconfig make dep make See how that goes :-) > After check the ocf/README, I find this information: > > * make sure that cryptodev.h (from ocf-linux.tar.gz) is installed as > crypto/cryptodev.h in an include directory that is used for building > applications for your platform. For example on a host system that > might be: > > /usr/include/crypto/cryptodev.h > > Now, I just change the snapgear\openswan\linux\net\ipsec\ipsec_ocf.h's > cryptodev.h to correct path. Does this not right? How I need to do? The addition of the: -I$(ROOTDIR)/modules/ocf in the snapgear/linux-2.4.x/net/ipsec/Makefile file should have been enough to fix and include errors. Cheers, Davidm > On 9/3/07, David McCullough <Dav...@se...> wrote: > > > > > > Hi Carl, > > > > Ok, there are some bits missing from the openswan in your source tree > > when using snapgear-3.4. > > > > edit snapgear/linux-2.4.x/net/ipsec/Makefile, add the following to > > the > > first instance of EXTRA_CFLAGS: > > > > -I$(ROOTDIR)/modules/ocf > > > > edit snapgear/openswan/linux/net/ipsec/Config.in.os2_4, add the > > following line after the CONFIG_KLIPS_DEBUG line near the end. > > > > bool ' IPsec: OCF HW Acceleration support' > > CONFIG_KLIPS_OCF > > > > That should get you going. To rebuild do: > > > > make clean > > make oldconfig > > (answer y to KLIPS_OCF) > > make dep > > make > > > > See if that fixes it, if not let me know and I sort it out, > > > > Cheers, > > Davidm > > > > > > Jivin carl zhu lays it down ... > > > here you are, I have attached. > > > > > > On 8/31/07, David McCullough <Dav...@se...> > > wrote: > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > Hi David, > > > > > > > > > > Glad to find you response so quickly.:) > > > > > Do you work for Snapgear? > > > > > > > > Yes. > > > > > > > > > I use snapgear v3.4 and ixp csr 1.4 with > > > > > > > > That is what we use. > > > > > > > > > crypto to build the code. My device is ADI Coyote like. > > > > > I just get the code and patch the driver to let it use > > > > ethernet/crypto. > > > > > > > > Did you use the snapgear CSR patch ? > > > > > > > > > > > > http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20061012.sh > > > > > > > > Do you do a make config and enable OCF and the appropriate modules ? > > > > > > > > > Then I get such performance.(openswan + linux2.4.x) > > > > > > > > So are you now getting full performance or not ? > > > > > > > > If not, send me a copy these files and I should be able to sort it > > out. > > > > > > > > snapgear/linux-2.4.x/.config > > > > snapgear/modules/.config > > > > snapgear/config/.config > > > > > > > > Cheers. > > > > Davidm > > > > > > > > > On 8/31/07, David McCullough <Dav...@se...> > > > > wrote: > > > > > > > > > > > > > > > > > > Jivin carl zhu lays it down ... > > > > > > > Hi David, > > > > > > > > > > > > > > I have got your OCF linux code, but I have some question > > about > > > > it. > > > > > > > because source forge's mail list seems no one to answer. I send > > the > > > > mail > > > > > > to > > > > > > > you. > > > > > > > > > > > > I have not seen any mailing list mails or "pending" messages. Are > > you > > > > > > sending to the correct address ? You should subscribe before > > mailing > > > > > > to get a better response time. > > > > > > > > > > > > > the questions are: > > > > > > > 1, I use ocf-bench, get such result: > > > > > > > Using /lib/modules/2.4.32-uc0/kernel/ocf/ocf-bench.o > > > > > > > Crypto Speed tests > > > > > > > OCF: testing ... > > > > > > > OCF: 1044 requests of 1500 bytes in 17 jiffies > > > > > > > IXP: testing ... > > > > > > > IXP: 1044 requests of 1500 bytes in 13 jiffies > > > > > > > lsmod's result: > > > > > > > Module Size Used by > > > > > > > ixp4xx 5672 0 (unused) > > > > > > > cryptodev 5868 0 (unused) > > > > > > > ocf 15616 0 [ixp4xx cryptodev] > > > > > > > ixp425_eth 16700 2 > > > > > > > ixp400 412032 0 [ixp4xx ixp425_eth] > > > > > > > But I use openswan to build the VPN, the tcp throughput will > > be 3 > > > > > > Mbps, > > > > > > > if not use VPN, the throughput will be 70Mbps. > > > > > > > I dont know why? I think I can get 40-50Mbps in VPN... > > > > > > > > > > > > On an IXP you should get from 38-45Mbps depening on clock speed > > etc. > > > > > > > > > > > > 3Mbps is slow even for software crypto. Make sure you do not have > > > > > > cryptosoft loaded. > > > > > > > > > > > > > 2, Due to problem 1, I think the root cause may happened on OCF > > > > crypto > > > > > > API > > > > > > > with Openswan, but I can't find any document to discuss it. Do > > you > > > > have > > > > > > > some? > > > > > > > > > > > > Most likely you have openswan configured incorrectly. Check that > > > > > > CONFIG_KLIPS_OCF is enabled in the kernel build. > > > > > > > > > > > > Run "cryptotest" and check the throughput. If everything look > > > > > > accelerated, then you need to work out what is wrong with your > > > > openswan > > > > > > build/compile that is not enabled OCF support. > > > > > > > > > > > > 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 > > > > > > > > > > > > -- > > David McCullough, dav...@se..., Ph:+61 > > 734352815 > > Secure Computing - SnapGear http://www.uCdot.org > > http://www.cyberguard.com > > > make CFLAGS="-D__KERNEL__ -I/home/carl_zhu/snapgear/linux-2.4.x/include -Wall -Wstrict-prototypes -Wno-trigraphs -O -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale -malignment-traps -msoft-float -Uarm " -C /home/carl_zhu/snapgear/modules > make[2]: Entering directory `/home/carl_zhu/snapgear/modules' > make all_targets > make[3]: Entering directory `/home/carl_zhu/snapgear/modules' > make[3]: Nothing to be done for `all_targets'. > make[3]: Leaving directory `/home/carl_zhu/snapgear/modules' > make[2]: Leaving directory `/home/carl_zhu/snapgear/modules' > arm-linux-ld -EB -p -X -T arch/arm/vmlinux.lds arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o init/version.o init/do_mounts.o \ > --start-group \ > arch/arm/kernel/kernel.o arch/arm/mm/mm.o arch/arm/mach-ixp425/ixp425.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \ > drivers/char/char.o drivers/serial/serial.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/pci/driver.o drivers/mtd/mtdlink.o drivers/media/media.o crypto/crypto.o \ > net/network.o \ > arch/arm/nwfpe/math-emu.o arch/arm/lib/lib.a /home/carl_zhu/snapgear/linux-2.4.x/lib/lib.a \ > --end-group \ > -o vmlinux > net/network.o: In function `ipsec_ocf_sa_init': > sysctl_net.c:(.text+0x8a264): undefined reference to `crypto_newsession' > sysctl_net.c:(.text+0x8a284): undefined reference to `crypto_newsession' > sysctl_net.c:(.text+0x8a2a4): undefined reference to `crypto_newsession' > net/network.o: In function `ipsec_ocf_sa_free': > sysctl_net.c:(.text+0x8a35c): undefined reference to `crypto_freesession' > net/network.o: In function `ipsec_ocf_rcv_cb': > sysctl_net.c:(.text+0x8a4b4): undefined reference to `crypto_freereq' > net/network.o: In function `ipsec_ocf_rcv': > sysctl_net.c:(.text+0x8a60c): undefined reference to `crypto_getreq' > sysctl_net.c:(.text+0x8a884): undefined reference to `crypto_dispatch' > net/network.o: In function `ipsec_ocf_xmit_cb': > sysctl_net.c:(.text+0x8a98c): undefined reference to `crypto_freereq' > net/network.o: In function `ipsec_ocf_xmit': > sysctl_net.c:(.text+0x8aae0): undefined reference to `crypto_getreq' > sysctl_net.c:(.text+0x8ad2c): undefined reference to `crypto_dispatch' > net/network.o: In function `ipsec_ocf_check_alg': > sysctl_net.c:(.text+0x8adb4): undefined reference to `crypto_newsession' > sysctl_net.c:(.text+0x8ade8): undefined reference to `crypto_freesession' -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |