[Cryptodev-linux-devel] [PATCH 1/8] introduce struct kernel_crypt_op

2010-10-21 Thread Phil Sutter
This struct is meant as an internal wrapper around struct crypt_op, so additional information can be passed around within the kernel module without giving userspace access to it. --- cryptodev_int.h |5 +++ cryptodev_main.c | 79 - 2 files

[Cryptodev-linux-devel] [PATCH 6/8] increase the number of slots for asynchronous completion dynamically

2010-10-21 Thread Phil Sutter
--- cryptodev_main.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index 6ab235f..09d2c41 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -53,9 +53,10 @@ MODULE_LICENSE("GPL"); #define CRYPTODEV_STATS -

[Cryptodev-linux-devel] [PATCH 7/8] implement the poll() file operation

2010-10-21 Thread Phil Sutter
Since there is an asynchronous operation mode, poll() is useful to find out whether data can be written out or read in. --- cryptodev_main.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index 09d2c41..5c35e92

[Cryptodev-linux-devel] [PATCH 4/8] add some unlikely() hints to get_userbuf()

2010-10-21 Thread Phil Sutter
--- cryptodev_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index 6771f44..d2c78c1 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -584,12 +584,12 @@ static int get_userbuf(struct csession *ses, struct kernel_crypt_o

[Cryptodev-linux-devel] [PATCH 8/8] add async versions of the code samples

2010-10-21 Thread Phil Sutter
--- .gitignore |3 + examples/Makefile |9 +- examples/async_cipher.c | 281 + examples/async_hmac.c | 292 +++ examples/async_speed.c | 197 +++ exa

[Cryptodev-linux-devel] [PATCH 2/8] keep a copy of the IV and size in struct kernel_crypt_op

2010-10-21 Thread Phil Sutter
--- cryptodev_int.h |3 +++ cryptodev_main.c | 28 +++- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/cryptodev_int.h b/cryptodev_int.h index 6b0b909..5072e8f 100644 --- a/cryptodev_int.h +++ b/cryptodev_int.h @@ -120,6 +120,9 @@ struct compat_sess

[Cryptodev-linux-devel] [PATCH 3/8] store the hash output inside struct kernel_crypt_op

2010-10-21 Thread Phil Sutter
--- cryptodev_int.h |3 +++ cryptodev_main.c | 19 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/cryptodev_int.h b/cryptodev_int.h index 5072e8f..63e2ebd 100644 --- a/cryptodev_int.h +++ b/cryptodev_int.h @@ -123,6 +123,9 @@ struct kernel_crypt_op {

[Cryptodev-linux-devel] [PATCH 5/8] implement asynchronous operation mode

2010-10-21 Thread Phil Sutter
In order to submit a job for asynchronous completion, one uses the ioctl CIOCASYNCCRYPT, which is syntactically equal to CIOCCRYPT. But, the former will return immediately, the result has to be fetched later using CIOCASYNCFETCH (which will always return the first completed job, asking for a speci