git: fd53594ae75d - main - tcp: retire sysctl variable functions_inherit_listen_socket_stack
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Aug 2024 20:56:03 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=fd53594ae75dc6f8b0afad5adfe8dc78eccac161
commit fd53594ae75dc6f8b0afad5adfe8dc78eccac161
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-08-03 20:52:17 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-08-03 20:52:17 +0000
tcp: retire sysctl variable functions_inherit_listen_socket_stack
The default was true and it is consistent to inherit the TCP function
block from the listener as most of the other parameters.
Reviewed by: Peter Lei, cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46141
---
share/man/man4/tcp.4 | 7 +------
sys/netinet/tcp_syncache.c | 15 +--------------
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
index 70356baa2145..192fa90a1635 100644
--- a/share/man/man4/tcp.4
+++ b/share/man/man4/tcp.4
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 28, 2024
+.Dd August 3, 2024
.Dt TCP 4
.Os
.Sh NAME
@@ -622,11 +622,6 @@ Defaults to 60 seconds.
List of available TCP function blocks (TCP stacks).
.It Va functions_default
The default TCP function block (TCP stack).
-.It Va functions_inherit_listen_socket_stack
-Determines whether to inherit listen socket's TCP stack or use the current
-system default TCP stack, as defined by
-.Va functions_default .
-Default is true.
.It Va hostcache
The TCP host cache is used to cache connection details and metrics to
improve future performance of connections between the same hosts.
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index c797c6a99f4f..62a4a5a28878 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -114,14 +114,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(tcp_syncookiesonly), 0,
"Use only TCP SYN cookies");
-VNET_DEFINE_STATIC(int, functions_inherit_listen_socket_stack) = 1;
-#define V_functions_inherit_listen_socket_stack \
- VNET(functions_inherit_listen_socket_stack)
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, functions_inherit_listen_socket_stack,
- CTLFLAG_VNET | CTLFLAG_RW,
- &VNET_NAME(functions_inherit_listen_socket_stack), 0,
- "Inherit listen socket's stack");
-
#ifdef TCP_OFFLOAD
#define ADDED_BY_TOE(sc) ((sc)->sc_tod != NULL)
#endif
@@ -777,7 +769,6 @@ done:
static struct socket *
syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
{
- struct tcpcb *listening_tcb;
struct inpcb *inp = NULL;
struct socket *so;
struct tcpcb *tp;
@@ -802,11 +793,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
goto allocfail;
}
inp = sotoinpcb(so);
- if (V_functions_inherit_listen_socket_stack)
- listening_tcb = sototcpcb(lso);
- else
- listening_tcb = NULL;
- if ((tp = tcp_newtcpcb(inp, listening_tcb)) == NULL) {
+ if ((tp = tcp_newtcpcb(inp, sototcpcb(lso))) == NULL) {
in_pcbfree(inp);
sodealloc(so);
goto allocfail;