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.. Do I miss something? > > 5.11 is old alrea

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 > > problem here when the even port

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 > > > makes bind() users have more availabl

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

2021-02-20 Thread Jeremy Sowden
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 > > makes bind() users have more available slots at odd part. But there is a > > problem here when the even p

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

2021-02-20 Thread David Miller
From: Honglei Wang Date: Sat, 20 Feb 2021 19:03:56 +0800 > 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 > problem here when the even ports are used up. This happens when there > is a flood of short l

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

2021-02-20 Thread Honglei Wang
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 problem here when the even ports are used up. This happens when there is a flood of short life cycle connections. In this scenario, it starts getting ports fr