Discussion:
[Winpcap-users] Best buffer size for only sending pcap_t sessions
José Manuel Díaz
2016-03-07 08:57:45 UTC
Permalink
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é
Marcelo Castellon
2016-03-07 09:02:11 UTC
Permalink
A partir del día 01/12/2015 no perteneceré mas a la empresa.
Por cualquier consulta por favor contactar a Hugo Donadello (***@c4i.com.ar).

Muchas Gracias

Ing. Marcelo Castellon

Loading...