Hi,

On Wed, Sep 29, 2010 at 05:24:27PM +0200, Nikos Mavrogiannopoulos wrote:
> poll can also be seen as a generic way to check for IO, so if having
> two ioctls, one for submitting and one for retrieving, poll can also be
> used there.
> 
> What I don't like with read() and write() is that it comes quite
> unnatural writing and reading structures. They usually cope with sending
> and receiving arbitrary data rather than structures (ioctl is for that).

ACK. 

> > 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.
> 
> My problem is not with poll(). Poll is pretty straightforward for
> checking for IO. An ioctl() that returns the length of the queue would
> solve your issue there.

Also a good idea: CIOGETQUEUEFREE, CIOGETQUEUEDONE and CIOSETQUEUELEN or
so.

> > OTOH the kernel-side would indeed be a lot easier when ioctls were used.
> 
> and would be more consistent with the rest ioctls.

Fine with me, I will get back to you with some ioctl-based solution
within the next few days. Thanks for the review so far, having another
opinion at hand is really nice (especially when I can't decide whether
my shit is brilliant or simply stupid ;).

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