mirror of
https://github.com/curl/curl.git
synced 2026-08-03 08:00:34 +03:00
ngtcp2: overwrite rate-limits defaults
In pytests test_08 with the Caddy server, the new rate-limiting in ngtcp2 did close the connection because it found "too many" stream data packet repeats. It is unclear if this is some Caddy issue or if the ngtcp2 implementaton is wrong. Or if curl can do anything here. Reported as https://github.com/ngtcp2/ngtcp2/issues/1850 This PR overwrites the ratelimit defaults in ngtcp2 with ten times increased values. This makes the errors disappear on macOS. Enable test_08_04/05 in CI again to see if there are any issues to be found there. (We had those disabled before having parallel pytests.) Closes #19274
This commit is contained in:
parent
a97f9d41cc
commit
446dae5bfe
2 changed files with 4 additions and 19 deletions
|
|
@ -457,17 +457,6 @@ static void quic_settings(struct cf_ngtcp2_ctx *ctx,
|
|||
struct Curl_easy *data,
|
||||
struct pkt_io_ctx *pktx)
|
||||
{
|
||||
#ifdef NGTCP2_SETTINGS_V2x
|
||||
static uint16_t mtu_probes[] = {
|
||||
1472, /* what h2o offers */
|
||||
1452, /* what Caddy offers */
|
||||
1454 - 48, /* The well known MTU used by a domestic optic fiber
|
||||
service in Japan. */
|
||||
1390 - 48, /* Typical Tunneled MTU */
|
||||
1280 - 48, /* IPv6 minimum MTU */
|
||||
1492 - 48, /* PPPoE */
|
||||
};
|
||||
#endif
|
||||
ngtcp2_settings *s = &ctx->settings;
|
||||
ngtcp2_transport_params *t = &ctx->transport_params;
|
||||
|
||||
|
|
@ -485,12 +474,11 @@ static uint16_t mtu_probes[] = {
|
|||
s->max_window = 100 * ctx->max_stream_window;
|
||||
s->max_stream_window = 10 * ctx->max_stream_window;
|
||||
s->no_pmtud = FALSE;
|
||||
#ifdef NGTCP2_SETTINGS_V2x
|
||||
s->pmtud_probes = mtu_probes;
|
||||
s->pmtud_probeslen = CURL_ARRAYSIZE(mtu_probes);
|
||||
s->max_tx_udp_payload_size = 64 * 1024; /* mtu_probes[0]; */
|
||||
#ifdef NGTCP2_SETTINGS_V3
|
||||
/* try ten times the ngtcp2 defaults here for problems with Caddy */
|
||||
s->glitch_ratelim_burst = 1000 * 10;
|
||||
s->glitch_ratelim_rate = 33 * 10;
|
||||
#endif
|
||||
|
||||
t->initial_max_data = 10 * ctx->max_stream_window;
|
||||
t->initial_max_stream_data_bidi_local = ctx->max_stream_window;
|
||||
t->initial_max_stream_data_bidi_remote = ctx->max_stream_window;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ class TestCaddy:
|
|||
|
||||
# download 5MB files sequentially
|
||||
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
|
||||
@pytest.mark.skipif(condition=Env().ci_run, reason="not suitable for CI runs")
|
||||
@pytest.mark.parametrize("proto", ['h2', 'h3'])
|
||||
def test_08_04a_download_10mb_sequential(self, env: Env, caddy: Caddy, proto):
|
||||
if proto == 'h3' and not env.have_h3_curl():
|
||||
|
|
@ -121,7 +120,6 @@ class TestCaddy:
|
|||
|
||||
# download 10MB files sequentially
|
||||
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
|
||||
@pytest.mark.skipif(condition=Env().ci_run, reason="not suitable for CI runs")
|
||||
@pytest.mark.parametrize("proto", ['h2', 'h3'])
|
||||
def test_08_04b_download_10mb_sequential(self, env: Env, caddy: Caddy, proto):
|
||||
if proto == 'h3' and not env.have_h3_curl():
|
||||
|
|
@ -135,7 +133,6 @@ class TestCaddy:
|
|||
# download 10MB files parallel
|
||||
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
@pytest.mark.skipif(condition=Env().ci_run, reason="not suitable for CI runs")
|
||||
def test_08_05_download_1mb_parallel(self, env: Env, caddy: Caddy, proto):
|
||||
if proto == 'h3' and not env.have_h3_curl():
|
||||
pytest.skip("h3 not supported in curl")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue