> On 25 Mar 2024, at 19:06, Yaroslav Zhuravlev <y...@nginx.com> wrote: > > xml/en/docs/stream/ngx_stream_core_module.xml | 44 ++++++++++++++++++++++++-- > xml/ru/docs/stream/ngx_stream_core_module.xml | 44 ++++++++++++++++++++++++-- > 2 files changed, 80 insertions(+), 8 deletions(-) > > > # HG changeset patch > # User Yaroslav Zhuravlev <y...@nginx.com> > # Date 1706699963 0 > # Wed Jan 31 11:19:23 2024 +0000 > # Node ID 24664fe8ba2cc09e285d6ff8c761e0d074e5af20 > # Parent b35edde818698738de2ba059de4917439e7ab754 > Documented accept_filter, deferred, setfib in stream listen. > > diff --git a/xml/en/docs/stream/ngx_stream_core_module.xml > b/xml/en/docs/stream/ngx_stream_core_module.xml > --- a/xml/en/docs/stream/ngx_stream_core_module.xml > +++ b/xml/en/docs/stream/ngx_stream_core_module.xml > @@ -82,10 +82,13 @@ > [<literal>ssl</literal>] > [<literal>udp</literal>] > [<literal>proxy_protocol</literal>] > + [<literal>setfib</literal>=<value>number</value>] > [<literal>fastopen</literal>=<value>number</value>] > [<literal>backlog</literal>=<value>number</value>] > [<literal>rcvbuf</literal>=<value>size</value>] > [<literal>sndbuf</literal>=<value>size</value>] > + [<literal>accept_filter</literal>=<value>filter</value>] > + [<literal>deferred</literal>] > [<literal>bind</literal>] > [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] > [<literal>reuseport</literal>] > @@ -154,6 +157,15 @@ > <list type="tag"> > > <tag-name> > +<literal>setfib</literal>=<value>number</value> > +</tag-name> > +<tag-desc> > +this parameter (1.25.4) sets the associated routing table, FIB
Wrong version here and throughout the patch, otherwise looks good (together with the "fastopen bind" patch). > +(the <c-def>SO_SETFIB</c-def> option) for the listening socket. > +This currently works only on FreeBSD. > +</tag-desc> > + > +<tag-name> > <literal>fastopen</literal>=<value>number</value> > </tag-name> > <tag-desc> > @@ -200,6 +212,29 @@ > </tag-desc> > > <tag-name> > +<literal>accept_filter</literal>=<value>filter</value> > +</tag-name> > +<tag-desc> > +sets the name of accept filter > +(the <c-def>SO_ACCEPTFILTER</c-def> option) for the listening socket > +that filters incoming connections before passing them to > +<c-func>accept</c-func> (1.25.4). > +This works only on FreeBSD and NetBSD 5.0+. > +Possible values are > +<link url="http://man.freebsd.org/accf_data">dataready</link> > +and > +<link url="http://man.freebsd.org/accf_http">httpready</link>. > +</tag-desc> > + > +<tag-name> > +<literal>deferred</literal> > +</tag-name> > +<tag-desc> > +instructs to use a deferred <c-func>accept</c-func> > +(the <c-def>TCP_DEFER_ACCEPT</c-def> socket option) on Linux (1.25.4). > +</tag-desc> > + > +<tag-name> > <literal>bind</literal> > </tag-name> > <tag-desc> > @@ -212,11 +247,12 @@ > <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>. > It should be noted that the <c-func>getsockname</c-func> system call will be > made in this case to determine the address that accepted the connection. > -If the > +If the <literal>setfib</literal>, > <literal>fastopen</literal>, > -<literal>backlog</literal>, > -<literal>rcvbuf</literal>, <literal>sndbuf</literal>, > -<literal>ipv6only</literal>, <literal>reuseport</literal>, > +<literal>backlog</literal>, <literal>rcvbuf</literal>, > +<literal>sndbuf</literal>, <literal>accept_filter</literal>, > +<literal>deferred</literal>, <literal>ipv6only</literal>, > +<literal>reuseport</literal>, > or <literal>so_keepalive</literal> parameters > are used then for a given > <value>address</value>:<value>port</value> pair > diff --git a/xml/ru/docs/stream/ngx_stream_core_module.xml > b/xml/ru/docs/stream/ngx_stream_core_module.xml > --- a/xml/ru/docs/stream/ngx_stream_core_module.xml > +++ b/xml/ru/docs/stream/ngx_stream_core_module.xml > @@ -82,10 +82,13 @@ > [<literal>ssl</literal>] > [<literal>udp</literal>] > [<literal>proxy_protocol</literal>] > + [<literal>setfib</literal>=<value>число</value>] > [<literal>fastopen</literal>=<value>число</value>] > [<literal>backlog</literal>=<value>число</value>] > [<literal>rcvbuf</literal>=<value>размер</value>] > [<literal>sndbuf</literal>=<value>размер</value>] > + [<literal>accept_filter</literal>=<value>фильтр</value>] > + [<literal>deferred</literal>] > [<literal>bind</literal>] > [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] > [<literal>reuseport</literal>] > @@ -155,6 +158,15 @@ > <list type="tag"> > > <tag-name> > +<literal>setfib</literal>=<value>число</value> > +</tag-name> > +<tag-desc> > +этот параметр (1.25.4) задаёт таблицу маршрутизации, FIB > +(параметр <c-def>SO_SETFIB</c-def>) для слушающего сокета. > +В настоящий момент это работает только на FreeBSD. > +</tag-desc> > + > +<tag-name> > <literal>fastopen</literal>=<value>число</value> > </tag-name> > <tag-desc> > @@ -201,6 +213,29 @@ > </tag-desc> > > <tag-name> > +<literal>accept_filter</literal>=<value>фильтр</value> > +</tag-name> > +<tag-desc> > +задаёт название accept-фильтра > +(параметр <c-def>SO_ACCEPTFILTER</c-def>) для слушающего сокета, > +который включается для фильтрации входящих соединений > +перед передачей их в <c-func>accept</c-func> (1.25.4). > +Работает только на FreeBSD и NetBSD 5.0+. > +Можно использовать два фильтра: > +<link url="http://man.freebsd.org/accf_data">dataready</link> > +и > +<link url="http://man.freebsd.org/accf_http">httpready</link>. > +</tag-desc> > + > +<tag-name> > +<literal>deferred</literal> > +</tag-name> > +<tag-desc> > +указывает использовать отложенный <c-func>accept</c-func> > +(параметр <c-def>TCP_DEFER_ACCEPT</c-def> сокета) на Linux (1.25.4). > +</tag-desc> > + > +<tag-name> > <literal>bind</literal> > </tag-name> > <tag-desc> > @@ -214,11 +249,12 @@ > <c-func>bind</c-func> только на <literal>*:</literal><value>порт</value>. > Необходимо заметить, что в этом случае для определения адреса, на которой > пришло соединение, делается системный вызов <c-func>getsockname</c-func>. > -Если же используются параметры > +Если же используются параметры <literal>setfib</literal>, > <literal>fastopen</literal>, > -<literal>backlog</literal>, > -<literal>rcvbuf</literal>, <literal>sndbuf</literal>, > -<literal>ipv6only</literal>, <literal>reuseport</literal> > +<literal>backlog</literal>, <literal>rcvbuf</literal>, > +<literal>sndbuf</literal>, <literal>accept_filter</literal>, > +<literal>deferred</literal>, <literal>ipv6only</literal>, > +<literal>reuseport</literal> > или <literal>so_keepalive</literal>, > то для данной пары > <value>адрес</value>:<value>порт</value> всегда делается > _______________________________________________ > nginx-devel mailing list > nginx-devel@nginx.org > https://mailman.nginx.org/mailman/listinfo/nginx-devel -- Sergey Kandaurov _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel