Re: [Ocf-linux-users] ocf-bench can not work good stop at ixp...
Brought to you by:
david-m
From: David M. <Dav...@se...> - 2008-01-10 04:02:08
|
Jivin wan...@to... lays it down ... > > Hello! > > I think it is about New Year when you read this email, so I say happy > New Year to you. > > I got a problem when I used ocf-bench to test my ixp425 system. > > I compiled mvl30+ixp425software withcrypto V1_5+ocf20050630+openswan2.3.0 > and patches which download from Intel. Thats a pretty old version you have there :-) Perhaps you should try something newer. Also, ocf-bench is a very simple and not well tested app for checking the overhead that OCF adds to the crypto processing. It is included in the ocf releases in case someone finds it useful as a reference, it is not meant to be stable to to be able to be run many times. If it runs once then it has done it's job ;-) That said, if you figure it out I am happy to accept patches :-) > I compiled ocf-bench.c as a module:ocf-bench.o, and I insmod it to test. At > first about 20 times, it works good. > > For details: > > # insmod ocf-bench.o request_q_len=200 request_num=1024 request_size=1500 > > Using ocf-bench.o Crypto Speed tests > > OCF: testing ... > > OCF: 1224 requests of 1500 bytes in 2 jiffies > > IXP: testing ... > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > status1 = 4 > > IXP: 1213 requests of 1500 bytes in 15 jiffies > > insmod: init_module: ocf-bench: Invalid argument > > > >From the test I see that ocf work faster than without ocf when request_q_len > is bigger than 65. That same goes for most HW crypto. > But, later, I got a problem. Ocf-bench can not run test. > > For details: > > # insmod ocf-bench.o > > Using ocf-bench.o > > Crypto Speed tests > > OCF: testing ... > > OCF: 1044 requests of 1500 bytes in 24 jiffies > > rateRatio is about 6Mbit/sec > > IXP: testing ... > > Ocf-bench stopped here. See the code of ocf-bench.c. Who knows. > First Ocfbench_init() run ocf test (this is good), then it run ixp test. > > Ocfbench_init() invoke ixp_init() > > There are some codes of ixp_init(): > > > > status = ixCryptoAccCtxRegister(&ixp_ctx, &ixp_pri, &ixp_sec, > > ixp_register_cb, ixp_perform_cb, &ixp_ctx_id); > > > > if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) { > > while (!ixp_registered) > > schedule(); > > return ixp_registered < 0 ? -1 : 0; > > } > > ixp_registered is 0, so it stopped here. > > But why? See some codes of ixp_register_cb(): > > ixp_register_cb (UINT32 ctx_id, IX_MBUF *bufp, IxCryptoAccStatus status) > > { > > if (bufp) { > > IX_MBUF_MLEN(bufp) = IX_MBUF_PKT_LEN(bufp) = 0; > > kfree(IX_MBUF_MDATA(bufp)); > > IX_MBUF_MDATA(bufp) = NULL; > > } > > > > if (IX_CRYPTO_ACC_STATUS_WAIT == status) > > return; > > if (IX_CRYPTO_ACC_STATUS_SUCCESS == status) > > ixp_registered = 1; > > else > > ixp_registered = -1; > > } > > > > I print the status, it is 2 here, == IX_CRYPTO_ACC_STATUS_WAIT, so it can > not change ixp_registered from 0 to 1 or -1. > > Why ocf-bench can work good at first about 20 times, but can not work later? Sounds like the access library has got upset, it could be due to bugs in ocf-bench, can't really tell and I am not inclined to go looking. > I have changed nothing. you can see that ocf test work good, and if only run > ixp test it is good too. > > have you seen something like this? Please help me! I want to know what is > wrong, and how to let ocf-bench work good. You would need to make sure the ixp4xx driver does everything correctly and it close/freeing everything properly etc. It might be a good idea to try out the latest OCF release and see how that goes. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com |