PC-BSD/trueos 6dc197asys/dev/cxgbe t4_main.c t4_ioctl.h, sys/dev/cxgbe/tom t4_tom.c t4_listen.c

cxgbe(4): Add support for Connection Offload Policy (aka COP).

COP allows fine-grained control on whether to offload a TCP connection
using t4_tom, and what settings to apply to a connection selected for
offload.  t4_tom must still be loaded and IFCAP_TOE must still be
enabled for full TCP offload to take place on an interface.  The
difference is that IFCAP_TOE used to be the only knob and would enable
TOE for all new connections on the inteface, but now the driver will
also consult the COP, if any, before offloading to the hardware TOE.

A policy is a plain text file with any number of rules, one per line.
Each rule has a "match" part consisting of a socket-type (L = listen,
A = active open, P = passive open, D = don't care) and a pcap-filter(7)
expression, and a "settings" part that specifies whether to offload the
connection or not and the parameters to use if so.  The general format
of a rule is: [socket-type] expr => settings

Example.  See cxgbetool(8) for more information.
[L] ip && port http => offload
[L] port 443 => !offload
[L] port ssh => offload
[P] src net 192.168/16 && dst port ssh => offload !nagle !timestamp cong newreno
[P] dst port ssh => offload !nagle ecn cong tahoe
[P] dst port http => offload
[A] dst port 443 => offload tls
[A] dst net 192.168/16 => offload !timestamp cong highspeed

The driver processes the rules for each new listen, active open, or
passive open and stops at the first match.  There is an implicit rule at
the end of every policy that prohibits offload when no rule in the
policy matches:
[D] all => !offload

This is a reworked and expanded version of a patch submitted by
Krishnamraju Eraparaju @ Chelsio.

Sponsored by:   Chelsio Communications
DeltaFile
+452-0usr.sbin/cxgbetool/cxgbetool.c
+210-34sys/dev/cxgbe/tom/t4_tom.c
+143-1usr.sbin/cxgbetool/cxgbetool.8
+137-0sys/dev/cxgbe/t4_main.c
+103-33sys/dev/cxgbe/tom/t4_listen.c
+85-25sys/dev/cxgbe/tom/t4_connect.c
+40-0sys/dev/cxgbe/t4_ioctl.h
+12-5sys/dev/cxgbe/tom/t4_cpl_io.c
+8-3sys/dev/cxgbe/tom/t4_tom.h
+4-2sys/dev/cxgbe/t4_sge.c
+4-1sys/dev/cxgbe/adapter.h
+1-0usr.sbin/cxgbetool/Makefile
+1-0sys/dev/cxgbe/offload.h
+1,200-10413 files

UnifiedSplitRaw