hello,

On Thu, 2008-01-03 at 01:29 +0100, Luca Deri wrote:
> > Here handle->buffer refers to a memory mapped kernel buffer, which  
> > holds
> > the USB Request Blocks and related meta-data. To make the patch work  
> > is
> > necessary to perform a memcpy from the kernel buffer to the user
> > provided one, but this solution will remove the performance gain of  
> > the
> > memory mapped access.
> 
> perhaps a spinlock will be enough?

Well, It the question is to ensure reentrancy, the lock is necessary
only to protect the break_loop field, since the data access is thread
safe 'as-is': the required locking/synchronization is provided by the
kernel via the ioctl call used to request the available URBs. 

Anyway, to implement your proposed API, the received URB must exposed to
the user into the provided buffer, so a copy is necessary. 

Please note that a similar problem will arise also if the patch to
enable memory mapped access to ethernet capture (currently pending) will
be accepted/merged.

ciao,

Paolo
--------------------------------------------------------------------

CONFIDENTIALITY NOTICE

This message and its attachments are addressed solely to the persons above and 
may contain confidential information. If you have received the message in 
error, be informed that any use of the content hereof is prohibited. Please 
return it immediately to the sender and delete the message. Should you have any 
questions, please contact us by replying to [EMAIL PROTECTED]

        Thank you

                                        www.telecomitalia.it

--------------------------------------------------------------------
                        
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to