diff options
author | Luigi Rizzo <luigi@FreeBSD.org> | 2015-07-10 05:51:36 +0000 |
---|---|---|
committer | Luigi Rizzo <luigi@FreeBSD.org> | 2015-07-10 05:51:36 +0000 |
commit | 847bf38369b6ea5abf8b6409006468cfe4f66d5e (patch) | |
tree | 2a938ad28f8fa79c60e58c3430a4c2c93631db94 /sys/net/netmap.h | |
parent | 9d73ee0f82b756db5e53a32e55766db958d41dba (diff) | |
download | src-847bf38369b6ea5abf8b6409006468cfe4f66d5e.tar.gz src-847bf38369b6ea5abf8b6409006468cfe4f66d5e.zip |
Sync netmap sources with the version in our private tree.
This commit contains large contributions from Giuseppe Lettieri and
Stefano Garzarella, is partly supported by grants from Verisign and Cisco,
and brings in the following:
- fix zerocopy monitor ports and introduce copying monitor ports
(the latter are lower performance but give access to all traffic
in parallel with the application)
- exclusive open mode, useful to implement solutions that recover
from crashes of the main netmap client (suggested by Patrick Kelsey)
- revised memory allocator in preparation for the 'passthrough mode'
(ptnetmap) recently presented at bsdcan. ptnetmap is described in
S. Garzarella, G. Lettieri, L. Rizzo;
Virtual device passthrough for high speed VM networking,
ACM/IEEE ANCS 2015, Oakland (CA) May 2015
http://info.iet.unipi.it/~luigi/research.html
- fix rx CRC handing on ixl
- add module dependencies for netmap when building drivers as modules
- minor simplifications to device-specific routines (*txsync, *rxsync)
- general code cleanup (remove unused variables, introduce macros
to access rings and remove duplicate code,
Applications do not need to be recompiled, unless of course
they want to use the new features (monitors and exclusive open).
Those willing to try this code on stable/10 can just update the
sys/dev/netmap/*, sys/net/netmap* with the version in HEAD
and apply the small patches to individual device drivers.
MFC after: 1 month
Sponsored by: (partly) Verisign, Cisco
Notes
Notes:
svn path=/head/; revision=285349
Diffstat (limited to 'sys/net/netmap.h')
-rw-r--r-- | sys/net/netmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/netmap.h b/sys/net/netmap.h index 1203bfb37fff..88b2957502ab 100644 --- a/sys/net/netmap.h +++ b/sys/net/netmap.h @@ -157,6 +157,11 @@ struct netmap_slot { /* * must be set whenever buf_idx is changed (as it might be * necessary to recompute the physical address and mapping) + * + * It is also set by the kernel whenever the buf_idx is + * changed internally (e.g., by pipes). Applications may + * use this information to know when they can reuse the + * contents of previously prepared buffers. */ #define NS_REPORT 0x0002 /* ask the hardware to report results */ @@ -513,6 +518,9 @@ enum { NR_REG_DEFAULT = 0, /* backward compat, should not be used. */ /* monitor uses the NR_REG to select the rings to monitor */ #define NR_MONITOR_TX 0x100 #define NR_MONITOR_RX 0x200 +#define NR_ZCOPY_MON 0x400 +/* request exclusive access to the selected rings */ +#define NR_EXCLUSIVE 0x800 /* |