git: ce5a6a3adda6 - stable/14 - tcp: Add a new kernel-only TCP_USE_DDP socket option

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 12 Apr 2024 21:31:27 UTC
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=ce5a6a3adda64b3385312ffc9453b8ea9f556e80

commit ce5a6a3adda64b3385312ffc9453b8ea9f556e80
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-03-20 22:29:02 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-04-12 19:25:11 +0000

    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
    
    (cherry picked from commit 3d0a736796a99fe70be9de97beec8f10970c6905)
---
 sys/netinet/tcp.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index bfb825930c66..56271203bc18 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -187,6 +187,9 @@ struct tcphdr {
 #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 */