freebsd-dev/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 Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
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 Small textdump enhancements. 2012-11-01 04:07:08 +00:00
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 Garbage collect XFS bits which are now already completely disconnected 2013-03-02 15:33:54 +00:00
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 Attempt to mitigate poor initialization of arc4 by one-shot 2013-04-19 00:30:52 +00:00
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 Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
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 Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
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 Move the NFS FHA (File Handle Affinity) code from sys/nfsserver to 2013-04-17 22:42:43 +00:00
nfsclient A problem with the old NFS client where large writes to large files 2013-07-04 00:54:23 +00:00
nfsserver - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
nlm Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ofed Avoid trashing IP fragments: 2013-07-25 16:34:34 +00:00
opencrypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
pc98 MFi386: revision 251039 2013-06-01 12:21:59 +00:00
pci - Corrrect mispellings of word useful 2013-04-17 11:45:15 +00:00
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 Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
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 Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen Adjust i386 Xen PV support for updated Xen interface files. 2013-06-17 01:43:07 +00:00
Makefile Remove netncp cscope entry missed in r248097 2013-03-12 14:21:52 +00:00