]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tcp: connect() from bound sockets can be faster
authorEric Dumazet <edumazet@google.com>
Wed, 27 May 2015 17:46:02 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2015 18:30:10 +0000 (14:30 -0400)
commite2baad9e4b153c67dddc5ccf987395b842329c84
treef33a2c65ac5d1b832967e737e17bf19c4e79b34a
parent5a7e4b48104d390bba323d5cf9764cbbc9819eb7
tcp: connect() from bound sockets can be faster

__inet_hash_connect() does not use its third argument (port_offset)
if socket was already bound to a source port.

No need to perform useless but expensive md5 computations.

Reported-by: Crestez Dan Leonard <cdleonard@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c