[Winpcap-users] Best buffer size for only sending pcap_t sessions
José Manuel Díaz
josemanuel.diaz at jscingenium.com
Mon Mar 7 08:57:45 UTC 2016
Hi everyone,
I would like to know what is the best value for the "dim" argument in a call to pcap_setbuff for pcap_t sessions that will only be used for sending (never capturing).
I plan to have many of them (for the same interface) to be able to send from several threads simultaneously, and I don't want any kernel buffer reserved if it won't be used.
I know a kernel buffer is needed for capturing, but is it necessary for sending or "dim" should be 0 in that case?
Would "dim = 0" in pcap_setbuff be compatible with using both pcap_sendpacket and pcap_sendqueue_alloc afterwards?
By the way, how does these sends from multiple threads and pcap_t sessions (for the same interface) integrate within the kernel? I assume send parallelism cannot reach the network card. Do frames get serialized in the end with spin or another kind of lock inside WinPcap? Alternatively, is NDIS responsible for that synchronization? What I'm worried about is the effect of that synchronization on the overall performance, what the best place is to put it, the application or WinPcap/NDIS, and how to assess the threshold for which too much transmission concurrency kills performance inside the kernel because of the collisions.
Thank you very much,
José
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20160307/cd0dfdf8/attachment.html>
More information about the Winpcap-users
mailing list