Re: [PATCH] tcp: avoid unnecessary loop if even ports are used up

2021-02-22 Thread Honglei Wang
On Mon, Feb 22, 2021 at 7:29 PM Eric Dumazet wrote: > > On Mon, Feb 22, 2021 at 12:10 PM Honglei Wang wrote: > > > Really? I just came to the latest 5.11 including Linus' tree and > > net-next, seems it's still here at line > > 725 of inet_hashtables.c..

Re: [PATCH] tcp: avoid unnecessary loop if even ports are used up

2021-02-22 Thread Honglei Wang
On Mon, Feb 22, 2021 at 3:47 PM Eric Dumazet wrote: > > On Sat, Feb 20, 2021 at 12:04 PM Honglei Wang wrote: > > > > We are getting port for connect() from even ports firstly now. This > > makes bind() users have more available slots at odd part. But there is a > &

Re: [PATCH] tcp: avoid unnecessary loop if even ports are used up

2021-02-21 Thread Honglei Wang
On Sun, Feb 21, 2021 at 6:06 AM Jeremy Sowden wrote: > > On 2021-02-20, at 13:44:02 -0800, David Miller wrote: > > From: Honglei Wang > > Date: Sat, 20 Feb 2021 19:03:56 +0800 > > > > > We are getting port for connect() from even ports firstly now. This &

[PATCH] tcp: avoid unnecessary loop if even ports are used up

2021-02-20 Thread Honglei Wang
d doing unnecessary loop. Signed-off-by: Honglei Wang --- net/ipv4/inet_hashtables.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 45fb450b4522..c95bf5cf9323 100644 --- a/net/ipv4