Bug 204593 - listen(2): outdated "backlog" argument description
Summary: listen(2): outdated "backlog" argument description
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-15 20:08 UTC by Michael Orlitzky
Modified: 2019-08-15 20:08 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael Orlitzky 2019-08-15 20:08:30 UTC
The documentation for the "backlog" argument to the listen() call says...

       The  behavior of the backlog argument on TCP sockets changed with Linux
       2.2.  Now it specifies the  queue  length  for  completely  established
       sockets  waiting  to  be  accepted, instead of the number of incomplete
       connection requests.  The maximum length of the  queue  for  incomplete
       sockets  can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog.  When
       syncookies are enabled there is no logical maximum length and this set‐
       ting is ignored.  See tcp(7) for more information.

However, I believe this changed with linux-4.3 in commit ef547f2ac16bd9d:

https://github.com/torvalds/linux/commit/ef547f2ac16bd9d77a780a0e7c70857e69e8f23f#diff-56ecfd3cd70d57cde321f395f0d8d743L43

Now, the test for the SYN queue is against sk_listener->sk_max_ack_backlog, which include/net/sock.h tells me is

  * @sk_max_ack_backlog: listen backlog set in listen()

In other words, I think the "backlog" argument for listen() now applies to incomplete connections as well.

Note You need to log in before you can comment on or make changes to this bug.