On 28-02-2018 10:29, Harsh Jain wrote: > > On 27-02-2018 20:09, Stephan Müller wrote: >> Am Sonntag, 25. Februar 2018, 06:25:06 CET schrieb Harsh Jain: >> >> Hi Harsh, >> >>> Hi Stephan, >>> >>> 1 of the test mentioned in test.sh is failing for AEAD AIO operation even >>> thought driver is returning EBADMSG(as expected) to af_alg with latest >>> cryptodev tree. >>> >>> Debug log and strace attached. >>> >>> Command : >>> >>> strace -o strace.log ../bin/kcapi -x 10 -c "gcm(aes)" -i >>> 7815d4b06ae50c9c56e87bd7 -k ea38ac0c9b9998c80e28fb496a2b88d9 -a >>> "853f98a750098bec1aa7497e979e78098155c877879556bb51ddeb6374cbaefc" -t >>> "c4ce58985b7203094be1d134c1b8ab0b" -q "b03692f86d1b8b39baf2abb255197c98" >> I am not seeing that the driver reports -EBADMSG in the strace log. If you see >> the following line, you will spot the issue: > Driver reports EBADMSG to af_alg it will not be available in strace. >> io_getevents(140715452821504, 1, 1, {{(nil), 0x24a41c0, 4294967222, 0}}, NULL) >> = 1 > Will try to setup gdb to narrow down the issue. If I change the -x 10 to -x 2 same command works fine. Try with gdb. AIO(-x 10) works fine with step by step debugging. Also verified by adding print in "af_alg_async_cb" for received err value. Driver is sending -74 here. > >> The 4th parameter is struct io_event that is returned from the kernel. It >> contains as 3rd value "4294967222". This value ought to be the return code of >> the crypto operation. If the value is positive, it returns the number of >> processed bytes. If it is negative, it holds the error code. >> >> I am not sure you expect a value close to 2^32 bytes as return code -- from >> the io_submit syscall where you send 48 bytes and from the command above I >> assume that this return value is wrong. >>> Thanks & Regards >>> >>> Harsh Jain >> Ciao >> Stephan >> >>