git: 167b9fac60a7 - stable/15 - socket: bump socket buffer limit to 8MB

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sun, 19 Oct 2025 07:37:32 UTC
The branch stable/15 has been updated by tuexen:

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

commit 167b9fac60a7d191349b9d841f2aa7d5d0f3eb94
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-10-15 20:04:00 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-10-19 07:35:12 +0000

    socket: bump socket buffer limit to 8MB
    
    Bump the socket buffer limit from 2 MB to 8MB.
    In particular, this allows to use larger values for TCP sockets,
    which may result in higher throughput values with default settings.
    In the review I was proposing using 16 MB, but in the transport
    call today we settled on a more conservative value of 8.
    Bumping it further will be done in combination with mitigations
    for mbuf exhaustion attacks.
    
    Reviewed by:            rscheff, Peter Lei, jtl, thj
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52873
    
    (cherry picked from commit 1fe6497b48d6954ac07870d920b2e5d6d206be5e)
---
 sys/sys/sockbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index b4593f38f592..739723754b7d 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -62,7 +62,7 @@
 #include <sys/_sx.h>
 #include <sys/_task.h>
 
-#define	SB_MAX		(2*1024*1024)	/* default for max chars in sockbuf */
+#define	SB_MAX		(8*1024*1024)	/* default for max chars in sockbuf */
 
 struct ktls_session;
 struct mbuf;