Find a file
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
bin sh: Remove an incorrect comment. 2013-07-25 20:50:35 +00:00
cddl Style issue in r253661. 2013-07-26 14:37:23 +00:00
contrib Add isnan() and isinf() to the global namespace in libstdc++'s <cmath>. 2013-07-23 10:23:43 +00:00
crypto Fix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import. 2013-06-30 07:46:22 +00:00
etc Regenerate usb.conf 2013-07-26 10:25:18 +00:00
games Remove a reference to instant-server which has been removed from the 2013-03-21 12:42:25 +00:00
gnu Make the BSD-licensed patch the default. 2013-07-26 21:25:18 +00:00
include stdlib.h: Add correct POSIX version for POSIX extensions to C. 2013-07-05 14:16:04 +00:00
kerberos5 Fix the getpwnam_r() call in the pname_to_uid() kerberos library function so 2013-05-02 12:52:49 +00:00
lib Implement certificate verification, and many other SSL-related 2013-07-26 15:53:43 +00:00
libexec Add the name of the file that could not be opened to the error message 2013-06-11 18:46:46 +00:00
release - Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4. 2013-07-26 14:23:25 +00:00
rescue - Trim an unused and bogus Makefile for mount_smbfs. 2013-06-28 21:00:08 +00:00
sbin Remove duplicated parapgraph. 2013-07-24 08:36:29 +00:00
secure Remove references to MK_IDEA. 2013-04-27 05:44:39 +00:00
share Make the BSD-licensed patch the default. 2013-07-26 21:25:18 +00:00
sys Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
tools Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
usr.bin Make the BSD-licensed patch the default. 2013-07-26 21:25:18 +00:00
usr.sbin Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro 2013-07-26 14:22:03 +00:00
COPYRIGHT Happy New Year 2013! 2012-12-31 11:22:55 +00:00
LOCKS
MAINTAINERS Use my @freebsd.org username, rather than ${WORK} username. 2013-05-18 14:05:32 +00:00
Makefile Fix bug in universe where if upgrade_checks wants a new make, 2013-07-24 17:55:08 +00:00
Makefile.inc1 Generate debug data release dist sets 2013-07-23 19:34:09 +00:00
ObsoleteFiles.inc In r227839, when removing libkvm dependency on procfs(5), 2013-07-10 19:44:43 +00:00
README
UPDATING fix UPDATING entry in r253677 2013-07-26 14:43:38 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html