opnsense-src/sys/dev/cxgbe
John Baldwin bf5956c185 cxgbe: Support TCP_USE_DDP on offloaded TOE connections
When this socket option is enabled, relatively large contiguous
buffers are allocated and used to receive data from the remote
connection.  When data is received a wrapper M_EXT mbuf is queued to
the socket's receive buffer.  This reduces the length of the linked
list of received mbufs and allows consumers to consume receive data in
larger chunks.

To minimize reprogramming the page pods in the adapter, receive
buffers for a given connection are recycled.  When a buffer has been
fully consumed by the receiver and freed, the buffer is placed on a
per-connection free buffers list.

The size of the receive buffers defaults to 256k and can be set via
the hw.cxgbe.toe.ddp_rcvbuf_len sysctl.  The
hw.cxgbe.toe.ddp_rcvbuf_cache sysctl (defaults to 4) determines the
maximum number of free buffers cached per connection.  Note that this
limit does not apply to "in-flight" receive buffers that are
associated with mbufs in the socket's receive buffer.

Co-authored-by:	Navdeep Parhar <np@FreeBSD.org>
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44001

(cherry picked from commit eba13bbc37ab4f45a8a3502d59c37d56d9a04ca5)
2024-04-12 12:25:17 -07:00
..
common cxgbe(4): Use the correct size for the CIM LA on the T6. 2024-01-10 21:22:31 -08:00
crypto sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
cudbg sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
cxgbei sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
firmware cxgbe(4): Update firmwares to 1.27.5.0 2024-01-10 21:22:31 -08:00
iw_cxgbe sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
tom cxgbe: Support TCP_USE_DDP on offloaded TOE connections 2024-04-12 12:25:17 -07:00
adapter.h cxgbe: Support TCP_USE_DDP on offloaded TOE connections 2024-04-12 12:25:17 -07:00
if_cc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ccv.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_cxl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_cxlv.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
offload.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
osdep.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_clip.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_clip.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_filter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
t4_ioctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_iov.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_l2t.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_l2t.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_main.c cxgbe: Support TCP_USE_DDP on offloaded TOE connections 2024-04-12 12:25:17 -07:00
t4_mp_ring.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_mp_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_netmap.c cxgbe(4): Add support for netmap offsets. 2024-01-10 21:22:31 -08:00
t4_sched.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_sge.c cxgbe: Support TCP_USE_DDP on offloaded TOE connections 2024-04-12 12:25:17 -07:00
t4_smt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_smt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_tracer.c cxgbe(4): Fix tracing with netlink enabled kernels. 2023-09-18 11:57:51 -07:00
t4_vf.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00