aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_quic_module.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2021-07-20 12:37:12 +0300
committerVladimir Homutov <vl@nginx.com>2021-07-20 12:37:12 +0300
commit6157d0b5c1b3a6be7928748df2cda19838889f4f (patch)
treea0aa60c1d01a0ae07299dce0b67ad6dd186d90d8 /src/http/modules/ngx_http_quic_module.c
parent31fe966e719c8fb0273119476b0c9a86d3f8e1b2 (diff)
downloadnginx-6157d0b5c1b3a6be7928748df2cda19838889f4f.tar.gz
nginx-6157d0b5c1b3a6be7928748df2cda19838889f4f.zip
QUIC: the "quic_gso" directive.
The directive enables usage of UDP segmentation offloading by quic. By default, gso is disabled since it is not always operational when detected (depends on interface configuration).
Diffstat (limited to 'src/http/modules/ngx_http_quic_module.c')
-rw-r--r--src/http/modules/ngx_http_quic_module.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_quic_module.c b/src/http/modules/ngx_http_quic_module.c
index d933dd1f9..ab84583f2 100644
--- a/src/http/modules/ngx_http_quic_module.c
+++ b/src/http/modules/ngx_http_quic_module.c
@@ -126,6 +126,13 @@ static ngx_command_t ngx_http_quic_commands[] = {
offsetof(ngx_quic_conf_t, retry),
NULL },
+ { ngx_string("quic_gso"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_quic_conf_t, gso_enabled),
+ NULL },
+
{ ngx_string("quic_host_key"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
ngx_http_quic_host_key,
@@ -290,6 +297,7 @@ ngx_http_quic_create_srv_conf(ngx_conf_t *cf)
conf->tp.active_connection_id_limit = NGX_CONF_UNSET_UINT;
conf->retry = NGX_CONF_UNSET;
+ conf->gso_enabled = NGX_CONF_UNSET;
conf->require_alpn = 1;
return conf;
@@ -348,6 +356,7 @@ ngx_http_quic_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
prev->tp.active_connection_id_limit, 2);
ngx_conf_merge_value(conf->retry, prev->retry, 0);
+ ngx_conf_merge_value(conf->gso_enabled, prev->gso_enabled, 0);
ngx_conf_merge_str_value(conf->host_key, prev->host_key, "");