Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open huge amount of outgoing connections (unable to bind ... )

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Le mercredi 21 avril 2010 à 04:18 +0500, Gaspar Chilingarov a écrit :

Yes, you bind the IP, but let kernel choose the port.

In this case, kernel is a bit dumb (or too smart ?)

If you want to check source, its in file net/ipv4/inet_connection_sock.c

function inet_csk_get_port()

you can remove the 

if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) { 
	spin_unlock(&head->lock); 
	snum = smallest_rover; 
	goto have_snum;
}

It will solve your problem (but bind() will probably be slow)



--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open huge a ..., Gaspar Chilingarov, (Tue Apr 20, 3:17 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 4:18 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 4:20 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 4:20 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 4:35 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Eric Dumazet, (Tue Apr 20, 4:42 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 4:57 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Gaspar Chilingarov, (Tue Apr 20, 5:12 pm)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Evgeniy Polyakov, (Wed Apr 21, 11:27 am)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Evgeniy Polyakov, (Wed Apr 21, 11:58 am)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Michael S. Tsirkin, (Sun Apr 25, 7:26 am)
Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open hu ..., Michael S. Tsirkin, (Sun Apr 25, 9:35 am)