tcpdump mailing list archives
Re: Libpcap reentrancy and PF_RING patch
From: "Paolo Abeni" <paolo.abeni () telecomitalia it>
Date: Thu, 03 Jan 2008 09:26:12 +0100
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 webmaster () telecomitalia it. Thank you www.telecomitalia.it -------------------------------------------------------------------- - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 01)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- <Possible follow-ups>
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 03)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Gregor Maier (Jan 07)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 10)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 22)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)