tcp: Add a new kernel-only TCP_USE_DDP socket option

This socket option can be used by in-kernel consumers (like NFS) to
request a NIC to use optimized receive of large buffers for a
connection.  The current use case is to support DDP by the TOE on
Chelsio NICs.

Reviewed by:	rscheff, tuexen, glebius
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44000
This commit is contained in:
John Baldwin 2024-03-20 15:29:02 -07:00
parent 25429e2743
commit 3d0a736796

View File

@ -202,6 +202,9 @@ __tcp_set_flags(struct tcphdr *th, uint16_t flags)
#define TCP_RXTLS_MODE 42 /* Receive TLS mode */
#define TCP_IWND_NB 43 /* Override initial window (units: bytes) */
#define TCP_IWND_NSEG 44 /* Override initial window (units: MSS segs) */
#ifdef _KERNEL
#define TCP_USE_DDP 45 /* Use direct data placement for so_rcvbuf */
#endif
#define TCP_LOGID_CNT 46 /* get number of connections with the same ID */
#define TCP_LOG_TAG 47 /* configure tag for grouping logs */
#define TCP_USER_LOG 48 /* userspace log event */