From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ttttabcd Subject: Re: Why not use all the syn queues? in the function "tcp_conn_request", I have some questions. Date: Sat, 08 Sep 2018 15:23:10 +0000 Message-ID: References: <47NgfBCN4YlW5rstCQGVJicSQ3yqiWFZpYPuBnmE1Jer0vxuBffWYbZzM2VmkeNNdk8gFgnMYo5T1fODpWGiRKnElyAY7bUmS_r-Z-SSaf4=@protonmail.com> Reply-To: Ttttabcd Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Netdev To: Neal Cardwell Return-path: Received: from mail-40133.protonmail.ch ([185.70.40.133]:56247 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbeIHUJ1 (ORCPT ); Sat, 8 Sep 2018 16:09:27 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Thank you very much for your previous answer, sorry for the inconvenience. But now I want to ask you one more question. The question is why we need two variables to control the syn queue? The first is the "backlog" parameter of the "listen" system call that contr= ols the maximum length limit of the syn queue, it also controls the accept = queue. The second is /proc/sys/net/ipv4/tcp_max_syn_backlog, which also controls t= he maximum length limit of the syn queue. So simply changing one of them and wanting to increase the syn queue is not= working. In our last discussion, I understood tcp_max_syn_backlog will retain the la= st quarter to the IP that has been proven to be alive But if tcp_max_syn_backlog is very large, the syn queue will be filled as w= ell. So I don't understand why not just use a variable to control the syn queue. For example, just use tcp_max_syn_backlog, which is the maximum length limi= t for the syn queue, and it can also be retained to prove that the IP remai= ns the last quarter. The backlog parameter of the listen system call only controls the accpet qu= eue. I feel this is more reasonable. If I don't look at the source code, I reall= y can't guess the backlog parameter actually controls the syn queue. I always thought that it only controlled the accept queue before I looked a= t the source code, because the man page is written like this. Here is the man page's original words. The behavior of the backlog argument on TCP sockets changed with Linux 2.2.= Now it specifies the queue length for completely established sockets waiti= ng to be accepted, instead of the number of incomplete connection requests.= The maximum length of the queue for incomplete sockets can be set using /p= roc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is = no logical maximum length and this setting is ignored. See tcp(7) for more = information.