2023-03-14 14:25:56 -04:00
|
|
|
// Copyright 2023 The Go Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
// Package godebugs provides a table of known GODEBUG settings,
|
|
|
|
|
// for use by a variety of other packages, including internal/godebug,
|
|
|
|
|
// runtime, runtime/metrics, and cmd/go/internal/load.
|
|
|
|
|
package godebugs
|
|
|
|
|
|
|
|
|
|
// An Info describes a single known GODEBUG setting.
|
|
|
|
|
type Info struct {
|
|
|
|
|
Name string // name of the setting ("panicnil")
|
|
|
|
|
Package string // package that uses the setting ("runtime")
|
|
|
|
|
Changed int // minor version when default changed, if any; 21 means Go 1.21
|
|
|
|
|
Old string // value that restores behavior prior to Changed
|
|
|
|
|
Opaque bool // setting does not export information to runtime/metrics using [internal/godebug.Setting.IncNonDefault]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// All is the table of known settings, sorted by Name.
|
|
|
|
|
//
|
|
|
|
|
// Note: After adding entries to this table, run 'go generate runtime/metrics'
|
|
|
|
|
// to update the runtime/metrics doc comment.
|
|
|
|
|
// (Otherwise the runtime/metrics test will fail.)
|
|
|
|
|
//
|
|
|
|
|
// Note: After adding entries to this table, update the list in doc/godebug.md as well.
|
|
|
|
|
// (Otherwise the test in this package will fail.)
|
|
|
|
|
var All = []Info{
|
2024-05-02 14:29:16 -04:00
|
|
|
{Name: "asynctimerchan", Package: "time", Changed: 23, Old: "1"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "execerrdot", Package: "os/exec"},
|
2023-04-21 19:55:43 -07:00
|
|
|
{Name: "gocachehash", Package: "cmd/go"},
|
|
|
|
|
{Name: "gocachetest", Package: "cmd/go"},
|
|
|
|
|
{Name: "gocacheverify", Package: "cmd/go"},
|
2024-04-17 18:40:27 -07:00
|
|
|
{Name: "gotypesalias", Package: "go/types", Changed: 23, Old: "0"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "http2client", Package: "net/http"},
|
|
|
|
|
{Name: "http2debug", Package: "net/http", Opaque: true},
|
|
|
|
|
{Name: "http2server", Package: "net/http"},
|
2023-08-10 20:56:27 +00:00
|
|
|
{Name: "httplaxcontentlength", Package: "net/http", Changed: 22, Old: "1"},
|
2023-09-23 17:05:42 -04:00
|
|
|
{Name: "httpmuxgo121", Package: "net/http", Changed: 22, Old: "1"},
|
2024-06-20 10:23:42 -07:00
|
|
|
{Name: "httpservecontentkeepheaders", Package: "net/http", Changed: 23, Old: "1"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "installgoroot", Package: "go/build"},
|
2024-03-08 21:01:17 -05:00
|
|
|
{Name: "jstmpllitinterp", Package: "html/template", Opaque: true}, // bug #66217: remove Opaque
|
2023-03-14 14:25:56 -04:00
|
|
|
//{Name: "multipartfiles", Package: "mime/multipart"},
|
|
|
|
|
{Name: "multipartmaxheaders", Package: "mime/multipart"},
|
|
|
|
|
{Name: "multipartmaxparts", Package: "mime/multipart"},
|
net: enable multipath TCP by default for listeners
A previous change [1] was introduced to enable MPTCP by default
for both the clients and servers, based on the discussions [2] in
golang#56539, where MPTCP would be an opt-in for a release or
two, and then would become an opt-out.
This change was not accepted at the time because the support for
a few socket options was missing [3]. Now that this support has been
added [4] and backported to stable versions not to block MPTCP
deployment with Go, it sounds like a good time to reconsider the use
of MPTCP by default.
Instead of enabling MPTCP on both ends by default, as a first step,
it seems safer to change the default behaviour only for the server
side (Listeners). On the server side, the impact is minimal: when
clients don't request to use MPTCP, server applications will create
"plain" TCP sockets within the kernel when connections are accepted,
making the performance impact minimal. This should also ease
experiments where MPTCP is enabled by default on the client side
(Dialer).
The changes in this patch consist of a duplication of the mptcpStatus
enumeration to have both a mptcpStatusDial and a mptcpStatusListen,
where MPTCP is enabled by default in mptcpStatusListen, but disabled
by default in mptcpStatusDial. It is still possible to turn MPTCP support
on and off by using GODEBUG=multipathtcp=1.
[1] https://go-review.googlesource.com/c/go/+/563575
[2] https://go.dev/issue/56539#issuecomment-1309294637
[3] https://github.com/multipath-tcp/mptcp_net-next/issues/383
[4] https://github.com/torvalds/linux/commit/bd11dc4fb969ec148e50cd87f88a78246dbc4d0b
[5] https://www.mptcp.dev/faq.html#why--when-should-mptcp-be-enabled-by-default
Updates #56539
Change-Id: I1ca0d6aaf74d3bda5468af135e29cdb405d3fd00
GitHub-Last-Rev: 5f9f29bfc13ad4ea6bfd1e0fc95a91bd824f4048
GitHub-Pull-Request: golang/go#69016
Reviewed-on: https://go-review.googlesource.com/c/go/+/607715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-08-28 17:45:58 +00:00
|
|
|
{Name: "multipathtcp", Package: "net", Changed: 24, Old: "0"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "netdns", Package: "net", Opaque: true},
|
2024-06-11 09:36:49 -07:00
|
|
|
{Name: "netedns0", Package: "net", Changed: 19, Old: "0"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "panicnil", Package: "runtime", Changed: 21, Old: "1"},
|
|
|
|
|
{Name: "randautoseed", Package: "math/rand"},
|
2024-08-16 01:29:18 +03:00
|
|
|
{Name: "randseednop", Package: "math/rand", Changed: 24, Old: "0"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "tarinsecurepath", Package: "archive/tar"},
|
2023-11-10 10:12:48 -08:00
|
|
|
{Name: "tls10server", Package: "crypto/tls", Changed: 22, Old: "1"},
|
2024-05-22 11:39:41 +02:00
|
|
|
{Name: "tls3des", Package: "crypto/tls", Changed: 23, Old: "1"},
|
2024-05-18 20:15:38 +02:00
|
|
|
{Name: "tlskyber", Package: "crypto/tls", Changed: 23, Old: "0", Opaque: true},
|
2023-08-08 18:25:59 -07:00
|
|
|
{Name: "tlsmaxrsasize", Package: "crypto/tls"},
|
2023-11-10 10:42:42 -08:00
|
|
|
{Name: "tlsrsakex", Package: "crypto/tls", Changed: 22, Old: "1"},
|
2023-11-21 16:37:07 +01:00
|
|
|
{Name: "tlsunsafeekm", Package: "crypto/tls", Changed: 22, Old: "1"},
|
2024-03-11 18:16:16 +01:00
|
|
|
{Name: "winreadlinkvolume", Package: "os", Changed: 22, Old: "0"},
|
|
|
|
|
{Name: "winsymlink", Package: "os", Changed: 22, Old: "0"},
|
2024-05-15 13:46:38 -07:00
|
|
|
{Name: "x509keypairleaf", Package: "crypto/tls", Changed: 23, Old: "0"},
|
2024-02-07 12:22:48 -08:00
|
|
|
{Name: "x509negativeserial", Package: "crypto/x509", Changed: 23, Old: "1"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "x509sha1", Package: "crypto/x509"},
|
|
|
|
|
{Name: "x509usefallbackroots", Package: "crypto/x509"},
|
2023-12-04 10:17:34 -08:00
|
|
|
{Name: "x509usepolicies", Package: "crypto/x509"},
|
2023-03-14 14:25:56 -04:00
|
|
|
{Name: "zipinsecurepath", Package: "archive/zip"},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Lookup returns the Info with the given name.
|
|
|
|
|
func Lookup(name string) *Info {
|
|
|
|
|
// binary search, avoiding import of sort.
|
|
|
|
|
lo := 0
|
|
|
|
|
hi := len(All)
|
|
|
|
|
for lo < hi {
|
2023-09-12 13:18:33 +00:00
|
|
|
m := int(uint(lo+hi) >> 1)
|
2023-03-14 14:25:56 -04:00
|
|
|
mid := All[m].Name
|
|
|
|
|
if name == mid {
|
|
|
|
|
return &All[m]
|
|
|
|
|
}
|
|
|
|
|
if name < mid {
|
|
|
|
|
hi = m
|
|
|
|
|
} else {
|
|
|
|
|
lo = m + 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|