netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] tcp/dccp: better use of ephemeral ports
@ 2016-02-06  2:08 Eric Dumazet
  2016-02-06  2:08 ` [PATCH net-next 1/2] tcp/dccp: better use of ephemeral ports in connect() Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Dumazet @ 2016-02-06  2:08 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet

Big servers have bloated bind table, making very hard to succeed
ephemeral port allocations, without special containers/namespace tricks.

This patch series extends the strategy added in commit 07f4c90062f8 
("tcp/dccp: try to not exhaust ip_local_port_range in connect()").

Since ports used by connect() are much likely to be shared among them,
we give a hint to both bind() and connect() to keep the crowds separated
if possible.

Of course, if on a specific host an application needs to allocate ~30000
ports using bind(), it will still be able to do so. Same for ~30000 connect()
to a unique 2-tuple (dst addr, dst port)

New implemetation is also more friendly to softirqs and reschedules.

Eric Dumazet (2):
  tcp/dccp: better use of ephemeral ports in connect()
  tcp/dccp: better use of ephemeral ports in bind()

 net/ipv4/inet_connection_sock.c | 231 +++++++++++++++++++---------------------
 net/ipv4/inet_hashtables.c      | 170 ++++++++++++++---------------
 2 files changed, 195 insertions(+), 206 deletions(-)

-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-11 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06  2:08 [PATCH net-next 0/2] tcp/dccp: better use of ephemeral ports Eric Dumazet
2016-02-06  2:08 ` [PATCH net-next 1/2] tcp/dccp: better use of ephemeral ports in connect() Eric Dumazet
2016-02-06  2:08 ` [PATCH net-next 2/2] tcp/dccp: better use of ephemeral ports in bind() Eric Dumazet
2016-02-11 16:48 ` [PATCH net-next 0/2] tcp/dccp: better use of ephemeral ports David Miller
2016-02-11 16:58   ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).