diff options
| author | Vladimir Homutov <vl@nginx.com> | 2021-07-20 12:37:12 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2021-07-20 12:37:12 +0300 |
| commit | 6157d0b5c1b3a6be7928748df2cda19838889f4f (patch) | |
| tree | a0aa60c1d01a0ae07299dce0b67ad6dd186d90d8 /src/event/quic/ngx_event_quic_output.c | |
| parent | 31fe966e719c8fb0273119476b0c9a86d3f8e1b2 (diff) | |
| download | nginx-6157d0b5c1b3a6be7928748df2cda19838889f4f.tar.gz nginx-6157d0b5c1b3a6be7928748df2cda19838889f4f.tar.bz2 | |
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/event/quic/ngx_event_quic_output.c')
| -rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index ce3805c8f..dc4cf59be 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -212,13 +212,17 @@ ngx_quic_allow_segmentation(ngx_connection_t *c, ngx_quic_socket_t *qsock) ngx_quic_send_ctx_t *ctx; ngx_quic_connection_t *qc; + qc = ngx_quic_get_connection(c); + + if (!qc->conf->gso_enabled) { + return 0; + } + if (qsock->path->state != NGX_QUIC_PATH_VALIDATED) { /* don't even try to be faster on non-validated paths */ return 0; } - qc = ngx_quic_get_connection(c); - ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_initial); if (!ngx_queue_empty(&ctx->frames)) { return 0; |
