freebsd-nq/sys
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
..
amd64 - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc. 2013-07-26 19:06:14 +00:00
arm Revert ROOTDEVNAME change from previous commit. 2013-07-25 03:44:12 +00:00
boot Add 2 builtin words for working with directories: 2013-07-10 21:37:50 +00:00
bsm
cam CAM and mps(4) driver scanning changes. 2013-07-22 18:37:07 +00:00
cddl Following r222950, revert unintentional change cls -> class in argument name 2013-07-25 08:41:22 +00:00
compat Regenerate. 2013-07-21 19:44:53 +00:00
conf Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
contrib Merge ACPICA 20130725. 2013-07-26 21:34:09 +00:00
crypto Fix const propagation issues to make GCC happy. 2013-07-11 16:27:11 +00:00
ddb
dev Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
fs make path matching in devfs rules consistent and sane (and safer) 2013-07-26 14:25:58 +00:00
gdb rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST 2013-07-24 09:45:31 +00:00
geom When panicing due to the gjournal overflow, print the geom metadata 2013-07-10 10:11:43 +00:00
gnu/fs/reiserfs
i386 - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc. 2013-07-26 19:06:14 +00:00
ia64 In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and 2013-07-23 03:03:17 +00:00
isa
kern Use VMFS_OPTIMAL_SPACE instead of VMFS_ALIGNED_SPACE in shm_map(). 2013-07-24 20:34:25 +00:00
kgssapi Add support for host-based (Kerberos 5 service principal) initiator 2013-07-09 01:05:28 +00:00
libkern
mips This file isn't derived from anything delivered by Berkeley, so remove 2013-07-22 03:55:15 +00:00
modules Add support for packet-sniffing tracers to cxgbe(4). This works with 2013-07-26 22:04:11 +00:00
net Break out the static, global LACP debug options into a per-lagg unit 2013-07-26 19:41:13 +00:00
net80211 Add ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an 2013-07-25 06:23:26 +00:00
netatalk
netgraph Add constant for PPP-Max-PayLoad tag. 2013-07-23 10:25:34 +00:00
netinet Remove the large part of struct ipsecstat. Only few fields of this 2013-07-23 14:14:24 +00:00
netinet6 Remove the large part of struct ipsecstat. Only few fields of this 2013-07-23 14:14:24 +00:00
netipsec Remove the large part of struct ipsecstat. Only few fields of this 2013-07-23 14:14:24 +00:00
netipx
netnatm
netpfil Improve locking strategy between keys hash and ID hash. 2013-06-13 06:07:19 +00:00
netsmb Remove a reference to LK_DRAIN now that lockmgr(9) is gone from this 2013-06-28 20:21:13 +00:00
nfs
nfsclient A problem with the old NFS client where large writes to large files 2013-07-04 00:54:23 +00:00
nfsserver
nlm
ofed Avoid trashing IP fragments: 2013-07-25 16:34:34 +00:00
opencrypto
pc98 MFi386: revision 251039 2013-06-01 12:21:59 +00:00
pci
powerpc Increase the size of the OFW bounce buffer to 4 pages. With this I can now run 2013-07-24 02:01:01 +00:00
rpc Add support for host-based (Kerberos 5 service principal) initiator 2013-07-09 01:05:28 +00:00
security audit_proc_coredump: check return value of audit_new 2013-07-09 09:03:01 +00:00
sparc64 Include sys/systm.h after sys/param.h. 2013-07-15 15:40:57 +00:00
sys Bump __FreeBSD_version for the addition of libusb's pkgconf files. 2013-07-25 03:55:50 +00:00
teken
tools
ufs Update to comments describing block allocation policy. 2013-07-14 18:44:33 +00:00
vm Remove define and documentation for vm_pageout_algorithm missed in r253587 2013-07-26 02:00:06 +00:00
x86 Fix a KTR_BUSDMA format string. 2013-06-18 06:55:58 +00:00
xdr
xen Adjust i386 Xen PV support for updated Xen interface files. 2013-06-17 01:43:07 +00:00
Makefile