git: 004bb636ca65 - main - tcp: Move sysctl OIDs related to ECN to tcp_ecn.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Nov 2022 11:39:37 UTC
The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=004bb636ca65f3239da284c20abb7f9d1d953dee commit 004bb636ca65f3239da284c20abb7f9d1d953dee Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2022-11-06 11:36:55 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2022-11-06 11:38:42 +0000 tcp: Move sysctl OIDs related to ECN to tcp_ecn.c Keep all ECN related code in (mostly) one place. No functional change. Event: IETF 115 Hackathon Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D37285 --- sys/netinet/tcp_ecn.c | 13 +++++++++++++ sys/netinet/tcp_input.c | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c index 40791172e55f..3cbc1c53dad7 100644 --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -101,6 +101,19 @@ __FBSDID("$FreeBSD$"); #include <netinet/tcpip.h> #include <netinet/tcp_ecn.h> +static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "TCP ECN"); + +VNET_DEFINE(int, tcp_do_ecn) = 2; +SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, enable, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_ecn), 0, + "TCP ECN support"); + +VNET_DEFINE(int, tcp_ecn_maxretries) = 1; +SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_ecn_maxretries), 0, + "Max retries before giving up on ECN"); /* * Process incoming SYN,ACK packet diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a1787a0f93db..370b947767ff 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -204,20 +204,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_abc_l_var), 2, "Cap the max cwnd increment during slow-start to this number of segments"); -static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, - CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "TCP ECN"); - -VNET_DEFINE(int, tcp_do_ecn) = 2; -SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(tcp_do_ecn), 0, - "TCP ECN support"); - -VNET_DEFINE(int, tcp_ecn_maxretries) = 1; -SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(tcp_ecn_maxretries), 0, - "Max retries before giving up on ECN"); - VNET_DEFINE(int, tcp_insecure_syn) = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_syn, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_insecure_syn), 0,