Re: Re: [PATCH] tcp/dccp: replace using only even ports with all ports
From: Eric Dumazet <edumazet@google.com>
Date: 2024-07-25 07:32:44
On Thu, Jul 25, 2024 at 9:07 AM xiaolinkui [off-list ref] wrote:
Thank you for your reply. At 2024-07-22 21:50:39, "Eric Dumazet" [off-list ref] wrote:quoted
On Mon, Jul 22, 2024 at 2:41 AM [off-list ref] wrote:quoted
From: Linkui Xiao <redacted> In commit 207184853dbd ("tcp/dccp: change source port selection at connect() time"), the purpose is to address the issue of increased costs when all even ports are in use. But in my testing environment, this more cost issue has not been resolved.You missed the whole point of 1580ab63fc9a ("tcp/dccp: better use of ephemeral ports in connect()") Have you read 207184853dbd ("tcp/dccp: change source port selection at connect() ..." changelog and are you using IP_LOCAL_PORT_RANGE ?There seems to be some difference between IP_LOCAL_PORT_RANGE and "sysctl net.ipv4.ip_local_port_range".We can use the following system calls at the user layer to use IP_LOCAL_PORT_RANGE: setsockopt(sockfd, IPPROTO_IP, IP_LOCAL_PORT_RANGE, &opt, sizeof(opt)); But user behavior is uncontrollable.Is there any other way to use IP_LOCAL_PORT_RANGE?
If user behavior can not be changed, this is on their end. Sorry, we won't accept a patch going to the terrible situation we had before, where applications would fail completely in many cases.