Optimization #6928
opensource-netmap: improve netmap receive loop packet processing performance
Description
The packet receive processing loop in the source-netmap module can benefit from changing how it obtains Packet structures from the Packet pool. Currently it uses a call to PacketPoolGetPacket() . This function will only return a Packet structure if an empty one is available. Otherwise, it returns NULL and thus the netmap packet capture loop can stall until a Packet becomes available in the pool. Here is the current function call:
Recieve packet processing will be enhanced if the receive processing loop calls PacketGetFromQueueOrAlloc() instead. This function call will return an available Packet from the pool same as the former function, but it will allocate new Packet for the pool if one is not currently available. This should prevent the netmap receive processing loop from having to wait for a Packet to become available.
No data to display