freebsd-dev/sys/dev/netmap
Luigi Rizzo 091fd0ab54 Add support for transparent mode while in netmap.
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.
2013-01-23 05:37:45 +00:00
..
if_em_netmap.h add some definition and driver changes in preparation for 2013-01-17 22:14:58 +00:00
if_igb_netmap.h add some definition and driver changes in preparation for 2013-01-17 22:14:58 +00:00
if_lem_netmap.h add some definition and driver changes in preparation for 2013-01-17 22:14:58 +00:00
if_re_netmap.h add some definition and driver changes in preparation for 2013-01-17 22:14:58 +00:00
ixgbe_netmap.h add some definition and driver changes in preparation for 2013-01-17 22:14:58 +00:00
netmap_kern.h control some debugging messages with dev.netmap.verbose 2013-01-23 03:51:47 +00:00
netmap_mem2.c control some debugging messages with dev.netmap.verbose 2013-01-23 03:51:47 +00:00
netmap.c Add support for transparent mode while in netmap. 2013-01-23 05:37:45 +00:00