Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Sergey Kandaurov
January 18, 2024 11:22AM
On Thu, Jan 18, 2024 at 07:24:21PM +0400, Roman Arutyunyan wrote:
> Hi,
>
> On Thu, Jan 18, 2024 at 06:51:32PM +0400, Sergey Kandaurov wrote:
> >
> > > On 9 Jan 2024, at 19:39, Roman Arutyunyan <arut@nginx.com> wrote:
> > >
> > > We should trigger an error if this option (TCP_DEFER_ACCEPT) is set for UDP.
> > > We have a block "if (lsopt.type == SOCK_DGRAM) {}" later in this function.
> > >
> >
> > Sure, this and the next change needs appropriate checks.
> > SO_SETFIB used to set the routing table (next hop in ip_output)
> > doesn't impose restriction on the socket type, so it is ok.
> >
> > Note that such checks are also missing for HTTP/3
> > (see the relevant discussion in nginx-ru@ in December).
> >
> > Below is an updated patch series (reviewed changes skipped for brevity).
> > It now includes an updated patch for HTTP/3 as reported by Izorkin.
> >

[..]

>
> The patches look ok.
>
> However for even better visual compatibility between Stream and HTTP I suggest
> a small patch on top of everything which moves the fastopen check up.
>
> # HG changeset patch
> # User Roman Arutyunyan <arut@nginx.com>
> # Date 1705590758 -14400
> # Thu Jan 18 19:12:38 2024 +0400
> # Node ID c8c4fe87c61c39ced688ad66655f40951cde6bcc
> # Parent 0257dc20b29f2a897f90e78dc356d384c8d7f66d
> Stream: moved fastopen compatibility check.
>
> The move makes the code look similar to the corresponding code in http module.
>
> diff --git a/src/stream/ngx_stream_core_module.c b/src/stream/ngx_stream_core_module.c
> --- a/src/stream/ngx_stream_core_module.c
> +++ b/src/stream/ngx_stream_core_module.c
> @@ -1215,6 +1215,12 @@ ngx_stream_core_listen(ngx_conf_t *cf, n
> }
>
> if (lsopt.type == SOCK_DGRAM) {
> +#if (NGX_HAVE_TCP_FASTOPEN)
> + if (lsopt.fastopen != -1) {
> + return "\"fastopen\" parameter is incompatible with \"udp\"";
> + }
> +#endif
> +
> if (backlog) {
> return "\"backlog\" parameter is incompatible with \"udp\"";
> }
> @@ -1244,12 +1250,6 @@ ngx_stream_core_listen(ngx_conf_t *cf, n
> if (lsopt.proxy_protocol) {
> return "\"proxy_protocol\" parameter is incompatible with \"udp\"";
> }
> -
> -#if (NGX_HAVE_TCP_FASTOPEN)
> - if (lsopt.fastopen != -1) {
> - return "\"fastopen\" parameter is incompatible with \"udp\"";
> - }
> -#endif
> }
>
> for (n = 0; n < u.naddrs; n++) {

Makes sense, agreed.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 3] Stream connection handling updates

Roman Arutyunyan 806 November 10, 2023 05:08AM

[PATCH 1 of 3] Stream: socket peek in preread phase

Roman Arutyunyan 144 November 10, 2023 05:08AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 124 December 12, 2023 08:18AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Roman Arutyunyan 139 December 13, 2023 09:08AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 139 December 13, 2023 10:52AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 125 December 27, 2023 09:36AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Roman Arutyunyan 127 January 04, 2024 11:04AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 134 January 18, 2024 08:44AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Roman Arutyunyan 117 January 18, 2024 10:08AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 106 January 18, 2024 11:16AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Maxim Dounin 136 January 18, 2024 02:46PM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Sergey Kandaurov 111 January 19, 2024 06:44AM

Re: [PATCH 1 of 3] Stream: socket peek in preread phase

Maxim Dounin 131 January 19, 2024 03:28PM

[PATCH 2 of 3] Stream: virtual servers

Roman Arutyunyan 194 November 10, 2023 05:08AM

Re: [PATCH 2 of 3] Stream: virtual servers

Sergey Kandaurov 162 December 13, 2023 08:42AM

Re: [PATCH 2 of 3] Stream: virtual servers

Sergey Kandaurov 144 December 14, 2023 12:36PM

[PATCH 0 of 6] Re: [PATCH 2 of 3] Stream: virtual servers

Sergey Kandaurov 142 December 15, 2023 10:40AM

[PATCH 1 of 6] Stream: using ngx_stream_ssl_srv_conf_t *sscf naming convention

Sergey Kandaurov 160 December 15, 2023 10:40AM

Re: [PATCH 1 of 6] Stream: using ngx_stream_ssl_srv_conf_t *sscf naming convention

Roman Arutyunyan 136 January 08, 2024 08:32AM

[PATCH 2 of 6] Overhauled some diagnostic messages missed in 1b05b9bbcebf

Sergey Kandaurov 127 December 15, 2023 10:40AM

Re: [PATCH 2 of 6] Overhauled some diagnostic messages missed in 1b05b9bbcebf

Roman Arutyunyan 121 January 09, 2024 08:16AM

[PATCH 3 of 6] Stream: reshuffled ngx_stream_listen_opt_t fields

Sergey Kandaurov 148 December 15, 2023 10:40AM

Re: [PATCH 3 of 6] Stream: reshuffled ngx_stream_listen_opt_t fields

Roman Arutyunyan 123 January 09, 2024 08:18AM

[PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Sergey Kandaurov 131 December 15, 2023 10:40AM

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Roman Arutyunyan 119 January 09, 2024 10:40AM

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Sergey Kandaurov 112 January 18, 2024 09:52AM

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Roman Arutyunyan 115 January 18, 2024 10:26AM

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

Sergey Kandaurov 123 January 18, 2024 11:22AM

[PATCH 5 of 6] Stream: the "accept_filter" parameter of the "listen" directive

Sergey Kandaurov 142 December 15, 2023 10:40AM

Re: [PATCH 5 of 6] Stream: the "accept_filter" parameter of the "listen" directive

Roman Arutyunyan 127 January 11, 2024 07:42AM

[PATCH 6 of 6] Stream: the "setfib" parameter of the "listen" directive

Sergey Kandaurov 135 December 15, 2023 10:42AM

Re: [PATCH 6 of 6] Stream: the "setfib" parameter of the "listen" directive

Roman Arutyunyan 146 January 11, 2024 07:46AM

[PATCH 3 of 3] Stream: ngx_stream_pass_module

Roman Arutyunyan 159 November 10, 2023 05:08AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Sergey Kandaurov 122 December 13, 2023 10:46AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Sergey Kandaurov 154 December 15, 2023 10:48AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Sergey Kandaurov 116 February 13, 2024 05:48AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Roman Arutyunyan 156 February 21, 2024 08:38AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Sergey Kandaurov 116 February 28, 2024 05:18AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Roman Arutyunyan 139 February 28, 2024 09:24AM

Re: [PATCH 3 of 3] Stream: ngx_stream_pass_module

Sergey Kandaurov 219 February 29, 2024 06:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready