opnsense-src/sys/dev/cxgbe
Navdeep Parhar 1131c927c4 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
2018-04-14 19:07:56 +00:00
..
common cxgbe: Implement tcp_info handler for connections handled by t4_tom. 2018-04-03 01:22:15 +00:00
crypto Don't overflow the ipad[] array when clearing the remainder. 2018-02-26 22:17:27 +00:00
cudbg cxgbe(4): Fix unsafe mailbox access in cudbg. 2017-11-21 01:18:58 +00:00
cxgbei Use the offload transmit queue to set flags on TLS connections. 2018-03-27 20:54:57 +00:00
firmware Support for TLS offload of TOE connections on T6 adapters. 2018-03-13 23:05:51 +00:00
iw_cxgbe Optimize ibcore RoCE address handle creation from user-space. 2018-03-05 14:34:52 +00:00
tom cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
adapter.h cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
if_cc.c cxgbe(4): Attach to cards with the Terminator 6 ASIC. T6 cards will 2016-09-16 00:08:37 +00:00
if_ccv.c cxgbe(4): Attach to cards with the Terminator 6 ASIC. T6 cards will 2016-09-16 00:08:37 +00:00
if_cxl.c cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as 2015-02-06 01:10:04 +00:00
if_cxlv.c Chelsio T4/T5 VF driver. 2016-09-07 18:13:57 +00:00
offload.h cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
osdep.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
t4_if.m Use the port device name for the iov device for Chelsio T4/T5 cards. 2016-08-03 17:11:08 +00:00
t4_ioctl.h cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
t4_iov.c cxgbe(4): Update the VF device ids too. This should have been part 2017-05-05 16:52:25 +00:00
t4_l2t.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
t4_l2t.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
t4_main.c cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
t4_mp_ring.c sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
t4_mp_ring.h cxgbe(4): major tx rework. 2014-12-31 23:19:16 +00:00
t4_netmap.c netmap: align codebase to the current upstream (commit id 3fb001303718146) 2018-04-12 07:20:50 +00:00
t4_sched.c cxgbe(4): Avoid a NULL dereference that would occur during module unload 2017-08-06 19:45:59 +00:00
t4_sge.c cxgbe(4): Add support for Connection Offload Policy (aka COP). 2018-04-14 19:07:56 +00:00
t4_tracer.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
t4_vf.c cxgbe(4): Do not forward interrupts to queues with freelists. This 2017-12-22 19:10:19 +00:00