276486 |
31-Dec-2014 |
ngie |
MFC r264400,r265836:
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed. |
274259 |
08-Nov-2014 |
gnn |
MFC: 272962
Add a new option, -P, to pkt-gen which reads a single packet from a stored pcap file and transmits it instead of the default UDP packet.
Reviewed by: luigi |
270252 |
20-Aug-2014 |
luigi |
MFC 270063: update of netmap code (vtnet and cxgbe not merged yet because we need some other mfc first) |
262151 |
18-Feb-2014 |
luigi |
MFH: sync the netmap code with the one in HEAD (enhanced VALE switch, netmap pipes, emulated netmap mode). See details in the log for svn 261909. |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
251426 |
05-Jun-2013 |
luigi |
new features (mostly for testing netmap capabilities)
+ pkt-gen -f rx now remains active even when traffic stops Previous behaviour (exit after 1 second of silence) can be restored with the -W option
+ the -X option does a hexdump of the content of a packet (both tx and rx). This can be useful to check what goes in and out.
+ the -I option instructs the sender to use indirect buffers (not really useful other than to test the kernel module in the VALE switch)
|
251139 |
30-May-2013 |
luigi |
Bring in a number of new features, mostly implemented by Michio Honda:
- the VALE switch now support up to 254 destinations per switch, unicast or broadcast (multicast goes to all ports).
- we can attach hw interfaces and the host stack to a VALE switch, which means we will be able to use it more or less as a native bridge (minor tweaks still necessary). A 'vale-ctl' program is supplied in tools/tools/netmap to attach/detach ports the switch, and list current configuration.
- the lookup function in the VALE switch can be reassigned to something else, similar to the pf hooks. This will enable attaching the firewall, or other processing functions (e.g. in-kernel openvswitch) directly on the netmap port.
The internal API used by device drivers does not change.
Userspace applications should be recompiled because we bump NETMAP_API as we now use some fields in the struct nmreq that were previously ignored -- otherwise, data structures are the same.
Manpages will be committed separately.
|
251132 |
30-May-2013 |
luigi |
add support for rate-limiting in the sender (-R ...)
Obtained from: Giuseppe Lettieri
|
251131 |
30-May-2013 |
luigi |
add a compile-time option to copy packets instead of doing the buffer swapping.
|
251130 |
30-May-2013 |
luigi |
remove use of deprecated ioctl()
|
250099 |
30-Apr-2013 |
luigi |
sync with my local copy (this file may go away, eventually)
|
246896 |
17-Feb-2013 |
luigi |
update the netmap example programs merging some common code in nm_util.c
pkt-gen now implements several functions (unlimited transmit, receive, ping-pong) and can operate on a 'tap' device.
|
241464 |
11-Oct-2012 |
emaste |
Make local function static.
|
241169 |
03-Oct-2012 |
emaste |
Clean up compiler warnings.
More work is needed here but this now builds with WARNS=6.
Sponsored by: ADARA Networks MFC after: 2 weeks
|
240103 |
04-Sep-2012 |
emaste |
Failure to open netmap device is unrecoverable.
There's no reason to "fail later" since there's nothing this tool can do in netmap mode without /dev/netmap open.
|
239145 |
08-Aug-2012 |
emaste |
Be more descriptive about poll error / timeout when transmitting.
|
239139 |
08-Aug-2012 |
emaste |
Round displayed pps (instead of truncating)
|
238175 |
06-Jul-2012 |
emaste |
Allow continuous packet transmission (via -t 0)
Also add a missing check for the cancel flag while waiting for the first packet in receive mode.
|
238170 |
06-Jul-2012 |
emaste |
Also report tx bandwidth with Ethernet overhead
|
238165 |
06-Jul-2012 |
emaste |
Allow threads to finish up when terminated by user
Set a flag and allow worker threads to finish upon ^C, instead of immediately cancelling them, so that final packet count and rate stats can be displayed.
|
238081 |
03-Jul-2012 |
emaste |
Update comment to reflect function's actual operation
|
237729 |
28-Jun-2012 |
emaste |
Fix ioctl type for compiling with clang
|
234975 |
03-May-2012 |
luigi |
add support for pcap receive statistics (used by net-mgmt/darkstat)
|
234962 |
03-May-2012 |
luigi |
add some performance data
|
234956 |
03-May-2012 |
luigi |
- add code to run pkt-gen on top of libpcap so we can see the difference from a native API
- add some testing options, such as conditional prefetching and packet copy.
|
234955 |
03-May-2012 |
luigi |
- correct a bug in pcap_dispatch(): a count of 0 means infinity.
- in pcap_dispatch(), issue a prefetch on the buffer before the callback, this may save a little bit of time if the client is very fast.
- in pcap_inject(), use a fast copy routine, which also helps saving a few nanoseconds with fast clients.
|
234227 |
13-Apr-2012 |
luigi |
A bit of cleanup in the names of fields of netmap-related structures. Use the name 'ring' instead of 'queue' in all fields. Bump NETMAP_API.
|
234168 |
12-Apr-2012 |
luigi |
use getopt to parse options, add one option to set the wait time for link-up events
|
233947 |
06-Apr-2012 |
luigi |
we need to specify a NETMAP_API version or the ioctl() will fail.
|
232238 |
27-Feb-2012 |
luigi |
A bunch of netmap fixes:
USERSPACE: 1. add support for devices with different number of rx and tx queues;
2. add better support for zero-copy operation, adding an extra field to the netmap ring to indicate how many buffers we have already processed but not yet released (with help from Eddie Kohler);
3. The two changes above unfortunately require an API change, so while at it add a version field and some spares to the ioctl() argument to help detect mismatches.
4. update the manual page for the two changes above;
5. update sample applications in tools/tools/netmap
KERNEL:
1. simplify the internal structures moving the global wait queues to the 'struct netmap_adapter';
2. simplify the functions that map kring<->nic ring indexes
3. normalize device-specific code, helps mainteinance;
4. start exploring the impact of micro-optimizations (prefetch etc.) in the ixgbe driver. Use 'legacy' descriptors on the tx ring and prefetch slots gives about 20% speedup at 900 MHz. Another 7-10% would come from removing the explict calls to bus_dmamap* in the core (they are effectively NOPs in this case, but it takes expensive load of the per-buffer dma maps to figure out that they are all NULL.
Rx performance not investigated.
I am postponing the MFC so i can import a few more improvements before merging.
|
231198 |
08-Feb-2012 |
luigi |
- change the buffer size from a constant to a TUNABLE variable (hw.netmap.buf_size) so we can experiment with values different from 2048 which may give better cache performance.
- rearrange the memory allocation code so it will be easier to replace it with a different implementation. The current code relies on a single large contiguous chunk of memory obtained through contigmalloc. The new implementation (not committed yet) uses multiple smaller chunks which are easier to fit in a fragmented address space.
|
228975 |
30-Dec-2011 |
uqs |
Spelling fixes for tools/
Add some $FreeBSD$ tags so svn will allow the commit.
|
228276 |
05-Dec-2011 |
luigi |
1. Fix the handling of link reset while in netmap more. A link reset now is completely transparent for the netmap client: even if the NIC resets its own ring (e.g. restarting from 0), the client will not see any change in the current rx/tx positions, because the driver will keep track of the offset between the two.
2. make the device-specific code more uniform across different drivers There were some inconsistencies in the implementation of the netmap support routines, now drivers have been aligned to a common code structure.
3. import netmap support for ixgbe . This is implemented as a very small patch for ixgbe.c (233 lines, 11 chunks, mostly comments: in total the patch has only 54 lines of new code) , as most of the code is in an external file sys/dev/netmap/ixgbe_netmap.h , following some initial comments from Jack Vogel about making changes less intrusive. (Note, i have emailed Jack multiple times asking if he had comments on this structure of the code; i got no reply so i assume he is fine with it).
Support for other drivers (em, lem, re, igb) will come later.
"ixgbe" is now the reference driver for netmap support. Both the external file (sys/dev/netmap/ixgbe_netmap.h) and the device-specific patches (in sys/dev/ixgbe/ixgbe.c) are heavily commented and should serve as a reference for other device drivers.
Tested on i386 and amd64 with the pkt-gen program in tools/tools/netmap, the sender does 14.88 Mpps at 1050 Mhz and 14.2 Mpps at 900 MHz on an i7-860 with 4 cores and 82599 card. Haven't tried yet more aggressive optimizations such as adding 'prefetch' instructions in the time-critical parts of the code.
|
227614 |
17-Nov-2011 |
luigi |
Bring in support for netmap, a framework for very efficient packet I/O from userspace, capable of line rate at 10G, see
http://info.iet.unipi.it/~luigi/netmap/
At this time I am bringing in only the generic code (sys/dev/netmap/ plus two headers under sys/net/), and some sample applications in tools/tools/netmap. There is also a manpage in share/man/man4 [1]
In order to make use of the framework you need to build a kernel with "device netmap", and patch individual drivers with the code that you can find in
sys/dev/netmap/head.diff
The file will go away as the relevant pieces are committed to the various device drivers, which should happen in a few days after talking to the driver maintainers.
Netmap support is available at the moment for Intel 10G and 1G cards (ixgbe, em/lem/igb), and for the Realtek 1G card ("re"). I have partial patches for "bge" and am starting to work on "cxgbe". Hopefully changes are trivial enough so interested third parties can submit their patches. Interested people can contact me for advice on how to add netmap support to specific devices.
CREDITS: Netmap has been developed by Luigi Rizzo and other collaborators at the Universita` di Pisa, and supported by EU project CHANGE (http://www.change-project.eu/) The code is distributed under a BSD Copyright.
[1] In my opinion is a bad idea to have all manpage in one directory. We should place kernel documentation in the same dir that contains the code, which would make it much simpler to keep doc and code in sync, reduce the clutter in share/man/ and incidentally is the policy used for all of userspace code. Makefiles and doc tools can be trivially adjusted to find the manpages in the relevant subdirs.
|