091fd0ab54
By setting dev.netmap.fwd=1 (or enabling the feature with a per-ring flag), packets are forwarded between the NIC and the host stack unless the netmap client clears the NS_FORWARD flag on the individual descriptors. This feature greatly simplifies applications where some traffic (think of ARP, control traffic, ssh sessions...) must be processed by the host stack, whereas the bulk is handled by the netmap process which simply (un)marks packets that should not be forwarded. The default is chosen so that now a netmap receiver operates in a mode very similar to bpf. Of course there is no free lunch: traffic to/from the host stack still operates at OS speed (or less, as there is one extra copy in one direction). HOWEVER, since traffic goes to the user process before being reinjected, and reinjection occurs in a user context, you get some form of livelock protection for free. |
||
---|---|---|
.. | ||
if_em_netmap.h | ||
if_igb_netmap.h | ||
if_lem_netmap.h | ||
if_re_netmap.h | ||
ixgbe_netmap.h | ||
netmap_kern.h | ||
netmap_mem2.c | ||
netmap.c |