opnsense-src/tools/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
..
aac Fix warnings and set WARNS to 6. 2011-03-11 18:51:42 +00:00
ansify Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
ath Add include path to the ar9300 HAL. 2013-06-25 17:50:48 +00:00
bootparttest Add to the debug output the offset from the parent partitioning scheme. 2012-08-06 08:39:29 +00:00
build_option_survey Get the MK_FOO column right 2006-03-25 21:51:46 +00:00
bus_autoconf Use new -n option when executing kldload, to 2012-03-18 09:47:27 +00:00
cd2dvd Spelling fixes for tools/ 2011-12-30 00:04:11 +00:00
cfi Fix warnings and set WARNS to 6. 2011-03-11 18:48:28 +00:00
commitsdb Fix a bug that showed up when trying to produce a database for 2002-10-17 16:29:26 +00:00
crypto Prepare network statistics structures for migration to PCPU counters. 2013-07-09 09:32:06 +00:00
cxgbetool Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
cxgbtool Move cxgbtool from usr.sbin to tools/tools. 2011-08-10 22:03:34 +00:00
editing style(9) specifies that case statements are not indented. 2008-07-30 03:34:23 +00:00
epfe $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ether_reflect Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
find-sb Add fs_unrefs field to the super block structure. 2006-10-31 22:18:33 +00:00
fixwhite Add a `fix' for another whitespace bug. 2012-02-06 18:52:40 +00:00
gdb_regofs Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
genericize Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
hcomp Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
html-mv $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ifinfo Make ifinfo build. The struct if_data members ifi_recvquota and 2009-03-04 01:31:09 +00:00
ifpifa Fix license 2012-06-05 22:02:27 +00:00
ipw Fix type warnings on 64-bit machines. 2006-06-21 09:52:37 +00:00
iso Update URLs and fix regex to work with current version of the files. 2011-05-22 09:48:25 +00:00
iwi Fix warnings and style(9) issues. 2011-03-11 19:32:15 +00:00
kdrv Fix typos; each file has at least one s/seperat/separat/ 2002-08-11 13:05:30 +00:00
kernelcruft This simple shell-script tries to find *.c files under /sys 2001-11-05 22:06:09 +00:00
kerninclude Update this to reflect changes in config(8) usage. 2001-04-23 17:31:16 +00:00
kernxref Update a little bit. 2005-02-10 12:47:55 +00:00
kttcp Revert previous commit... 2012-10-10 08:36:38 +00:00
makeroot mdoc: silence a few mandoc lint warnings. 2013-05-28 09:33:46 +00:00
mcgrab Moved mcgrab(1) into a separate directory -- our .mk infrastructure 2010-02-25 14:36:50 +00:00
mctest Fix an error in our results printing. 2010-11-16 20:39:52 +00:00
mfi Expand a comment for clarity and fix a missed substitution. 2007-01-02 04:51:26 +00:00
mid Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ 2002-12-30 21:18:15 +00:00
mtxstat Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
mwl Update the includes to two more levels of subdirs. 2009-09-24 11:11:00 +00:00
nanobsd Remove CVS from the base system. 2013-06-15 20:29:07 +00:00
ncpus mptable.h is now in include/x86. 2011-03-11 18:44:16 +00:00
net80211 Correct sizeof usage 2012-06-25 05:41:16 +00:00
netmap new features (mostly for testing netmap capabilities) 2013-06-05 17:37:59 +00:00
netrate Set WARNS=3 so this actually compiles. 2013-03-20 21:47:05 +00:00
notescheck - Correct mispellings of word and 2013-04-17 11:48:46 +00:00
npe add npe tools; first is npestats which reports device statistics 2009-05-23 19:16:34 +00:00
nxge Merge Neterion if_nxge driver version 2.0.9.11230 with the following 2007-10-29 14:19:32 +00:00
pciroms Switch to 2-clause license and standard text 2013-06-06 21:09:27 +00:00
pirtool Remove 3rd clause, per email from bms 2007-01-11 05:00:30 +00:00
portsinfo $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
prstats Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
release Understand the old pseudo-device config(8) file directive, for 4.x. 2003-11-28 08:58:44 +00:00
scsi-defects $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
shlib-compat Add shlib-compat under tools. 2013-03-25 00:31:14 +00:00
sysbuild Remove the WITH_IDEA option and build it unconditionally. 2013-04-26 23:24:41 +00:00
syscall_timing Do not execute a needed statement with side-effect in assert(). 2012-06-06 17:26:52 +00:00
sysdoc Remove define and documentation for vm_pageout_algorithm missed in r253587 2013-07-26 02:00:06 +00:00
termcap Instead of only being able to compare two terminal definitions, now 2009-06-14 13:46:32 +00:00
tinybsd Properly spell "Class Based Queueing" 2013-03-27 15:10:40 +00:00
tionxcl Add new tool tionxcl to bring ttys out of exclusive mode when 2008-12-18 15:12:04 +00:00
track The error syntax has changed. 2012-08-30 22:56:32 +00:00
umastat Fix build. 2013-04-12 21:29:37 +00:00
usb Vi got me in trouble in r187102 - fix typo of duplicate output filename. 2009-01-12 17:26:52 +00:00
vhba Consistently set us to be SPC3 for our inquiry data. 2010-08-11 17:25:14 +00:00
vimage Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
vop_table - Initial revamp of vop_table.tcl. This scripting is ugly and will be 2005-01-05 06:53:03 +00:00
vxge Give some sort of message when the program is not run as root. 2011-05-03 16:00:36 +00:00
whereintheworld Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
wtap Add a BINDIR so "make install" works. 2012-03-13 20:30:23 +00:00
zfsboottest zfsboottest: remove explicit -Werror 2013-07-24 09:50:44 +00:00
README Remove scripts and tools which only functioned when src was using CVS 2012-09-13 17:49:11 +00:00

# $FreeBSD$

This directory is for tools.

A tool is something which is sometimes useful, and doesn't fit any of
the other categories.

Please make a subdir per program, and add a brief description to this
file.

ansify		Convert K&R-style function definitions to ANSI style
ath		Tools specific to the Atheros 802.11 support
cfi		Common Flash Interface (CFI) tool
commitsdb	A tool for reconstructing commit history using md5
		checksums of the commit logs.
crypto		Test and exercise tools related to the crypto framework
cxgbetool	A tool for the cxgbe(4) driver.
cxgbtool	A tool for the cxgb(4) driver.
diffburst	OBSOLETE: equivalent functionality is available via split -p.
		For example: "split -p ^diff < patchfile". See split(1).
editing		Editor modes and the like to help editing FreeBSD code.
epfe 		Extract printing filter examples from printing.sgml.
ether_reflect	An Ethernet packet reflector for low level testing.
find-sb		Scan a disk for possible filesystem superblocks.
gdb_regofs	A simple tool that prints out a register offset table
		for mapping gdb(1) register numbers to struct reg and
		struct fpreg offsets. The tool is useful on selected
		platforms only.
genericize	Turn a kernel config into something that can more easily
		be diffed against the appropriate GENERIC.
hcomp		Compress header files by removing comments and whitespace.
html-mv         Rename HTML generated filenames to human readable filenames.
ifinfo		Uses the interface MIB to print out all the information
		an interface exports in an ugly form.
iso             Tool to compare the iso3166 and iso639 files in
		/usr/share/misc with the data from the master sites.
iwi		Tools specific to the Intel PRO/Wireless 2200BG/2225BG/2915ABG
		support.
kdrv		KernelDriver; add/list/remove third-party kernel driver
		source to/in/from a kernel source tree.
kernelcruft	Shellscript to find orphaned *.c files in /sys
kerninclude	Shellscript to find unused #includes in the kernel.
kernxref	Shellscript to cross reference symbols in the LINT kernel.
kttcp		An in-kernel version of the ttcp network performance tool
mctest		A multicast test program
mid	 	Create a Message-ID database for mailing lists.
mwl		Tools specific to the Marvell 88W8363 support
ncpus		Count the number of processors
netmap		Test applications for netmap(4)
notescheck	Check for missing devices and options in NOTES files.
npe		Tools specific to the Intel IXP4XXX NPE device
nxge		A diagnostic tool for the nxge(4) driver
pciid		Generate src/share/misc/pci_vendors.
pciroms		A tool for dumping PCI ROM images. WARNING: alpha quality.
pirtool		A tool for dumping the $PIR table on i386 machines at runtime.
portsinfo 	Generate list of new ports for last two weeks.
prstats		Generate statistics about the PR database.
recoverdisk	Copy as much data as possible from a defective disk.
scsi-defects	Get at the primary or grown defect list of a SCSI disk.
sysdoc		Build a manual page with available sysctls for a specific
		kernel configuration.
tinybsd		Script to build FreeBSD embedded systems.
track		Track the progress of a world / kernel build
vimage		An interim utility for managing the virtualized network
		stack infrastructure.
vop_table	Generates a HTML document that shows all the VOP's in
		the kernel.
vxge		A diagnostic tool for the vxge(4) driver
whereintheworld	Summarizes "make world" output.