Hi,

On Wed, Sep 29, 2010 at 03:56:46PM +0200, Nikos Mavrogiannopoulos wrote:
> I like the implementation and the idea. A question would be why use
> read()/write()
> instead say of new ioctls (e.g. CIOCCRYPT_ASYNC)?

The motivation behind read() and write() is being able to fetch or push
more than a single struct crypt_op at once. When aiming for async
operation, one probably wants to prevent any blocking. For the write()
case, there is poll() as de-facto standard for ensuring a write is
possible without blocking.

You may say that I can't use poll() to find out how much can be written,
so when trying to write e.g. five objects at once, it could block after
the third. Ideally, one can configure the length of the free queue (or
have dynamic reallocation of list items), so any application doing batch
operations like that in an asynchronous manner does actually know how
much can be pushed at once.

I guess the best reason for using read/write/poll is probably the well
known programming interface.

OTOH the kernel-side would indeed be a lot easier when ioctls were used.

Greetings, Phil

-- 
Viprinet GmbH
Mainzer Str. 43
55411 Bingen am Rhein
Germany

Zentrale:     +49-6721-49030-0
Durchwahl:    +49-6721-49030-134
Fax:          +49-6721-49030-209

phil.sut...@viprinet.com
http://www.viprinet.com

Sitz der Gesellschaft: Bingen am Rhein
Handelsregister: Amtsgericht Mainz HRB40380
Geschäftsführer: Simon Kissel


_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to