diff mbox

Patch - Establishing more than 64K outgoing TCP connections

Message ID 241CE5A1B2AFFA4987A663380D74C0BB3FD69B0830@MBX73.ad2.softcom.biz
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Yavor Goulishev Oct. 28, 2008, 6:51 p.m. UTC
Hi guys,
I'm sending you a tiny patch for the kernel.
The change allowed me to establish more than 64K outgoing TCP connections from a single Linux box.
Being able to use multihomed client box to load test a server reduced dramatically the number of physical boxes I needed.
The other way to go was virtual machines, but you can't beat the simplicity of the single multihomed client.
Also the patch fixes an important symmetry.
Using the multihome setup is a simple technique to overcome the 64K limit on the server side.
The patch makes it possible on the client side too.

The fix is only for TCP but probably the same issue exists for UDP.
I didn't had the time to investigate.

The patch is against the latest code base 2.6.28-rc2.

--Yavor

Comments

David Miller Oct. 28, 2008, 10:59 p.m. UTC | #1
Please stop sending this patch over and over again, we've all seen it
the first time.

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yavor Goulishev Oct. 29, 2008, 3:17 a.m. UTC | #2
Sorry! Didn't mean to post multiple times.
Went through some trial and error to get the post through.

--Yavor

-----Original Message-----
From: David Miller [mailto:davem@davemloft.net]
Sent: Tuesday, October 28, 2008 4:00 PM
To: Yavor Goulishev
Cc: netdev@vger.kernel.org
Subject: Re: Patch - Establishing more than 64K outgoing TCP connections


Please stop sending this patch over and over again, we've all seen it
the first time.

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index bd1278a..d72fba6 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -109,7 +109,9 @@  int inet_csk_get_port(struct sock *sk, unsigned short snum)
 					hashinfo->bhash_size)];
 			spin_lock(&head->lock);
 			inet_bind_bucket_for_each(tb, node, &head->chain)
-				if (tb->ib_net == net && tb->port == rover)
+				if (tb->ib_net == net &&
+				    tb->port == rover &&
+				    inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb))
 					goto next;
 			break;
 		next: