freebsd-src/tools
Navdeep Parhar caf20efcde Add support for packet-sniffing tracers to cxgbe(4). This works with
all T4 and T5 based cards and is useful for analyzing TSO, LRO, TOE, and
for general purpose monitoring without tapping any cxgbe or cxl ifnet
directly.

Tracers on the T4/T5 chips provide access to Ethernet frames exactly as
they were received from or transmitted on the wire.  On transmit, a
tracer will capture a frame after TSO segmentation, hw VLAN tag
insertion, hw L3 & L4 checksum insertion, etc.  It will also capture
frames generated by the TCP offload engine (TOE traffic is normally
invisible to the kernel).  On receive, a tracer will capture a frame
before hw VLAN extraction, runt filtering, other badness filtering,
before the steering/drop/L2-rewrite filters or the TOE have had a go at
it, and of course before sw LRO in the driver.

There are 4 tracers on a chip.  A tracer can trace only in one direction
(tx or rx).  For now cxgbetool will set up tracers to capture the first
128B of every transmitted or received frame on a given port.  This is a
small subset of what the hardware can do.  A pseudo ifnet with the same
name as the nexus driver (t4nex0 or t5nex0) will be created for tracing.
The data delivered to this ifnet is an additional copy made inside the
chip.  Normal delivery to cxgbe<n> or cxl<n> will be made as usual.

/* watch cxl0, which is the first port hanging off t5nex0. */
# cxgbetool t5nex0 tracer 0 tx0  (watch what cxl0 is transmitting)
# cxgbetool t5nex0 tracer 1 rx0  (watch what cxl0 is receiving)
# cxgbetool t5nex0 tracer list
# tcpdump -i t5nex0   <== all that cxl0 sees and puts on the wire

If you were doing TSO, a tcpdump on cxl0 may have shown you ~64K
"frames" with no L3/L4 checksum but this will show you the frames that
were actually transmitted.

/* all done */
# cxgbetool t5nex0 tracer 0 disable
# cxgbetool t5nex0 tracer 1 disable
# cxgbetool t5nex0 tracer list
# ifconfig t5nex0 destroy
2013-07-26 22:04:11 +00:00
..
bsdbox Do a bunch of fixing and refactoring. 2012-08-29 22:55:50 +00:00
build Make the BSD-licensed patch the default. 2013-07-26 21:25:18 +00:00
debugscripts A number of places in the source tree still reference cuad.* after 2012-12-08 22:16:36 +00:00
diag Remove scripts and tools which only functioned when src was using CVS 2012-09-13 17:49:11 +00:00
kerneldoc Correct double "the the" 2012-09-14 21:28:56 +00:00
KSE Spelling fixes for tools/ 2011-12-30 00:04:11 +00:00
LibraryReport
regression wordexp(): Fix syntax validation for backslashes in single-quotes. 2013-07-23 21:09:26 +00:00
sched
test This test is working now, so remove it from NOTWORK. 2013-06-02 01:07:38 +00:00
tools Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
install.sh Use = not == in test arguments. 2013-01-24 20:47:37 +00:00
make_libdeps.sh Import libyaml as libbsdyml (private brand name) 2013-03-04 11:27:41 +00:00
README
tinder.sh Add a comment that shows how to limit the build to the specific list of arches. 2011-11-28 14:03:36 +00:00

$FreeBSD$

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.