]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix saving TX flow hash in sock for outgoing connections
authorSathya Perla <sathya.perla@emulex.com>
Wed, 22 Oct 2014 16:12:01 +0000 (21:42 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Oct 2014 20:14:29 +0000 (16:14 -0400)
commit975533f502e737eb10961a76bff2231cd5ace5e0
treeb94b6da692403861e4adc2835b994699beaa9a2b
parent86ee61372240a54853eb2146f7617dece9b33e7c
net: fix saving TX flow hash in sock for outgoing connections

The commit "net: Save TX flow hash in sock and set in skbuf on xmit"
introduced the inet_set_txhash() and ip6_set_txhash() routines to calculate
and record flow hash(sk_txhash) in the socket structure. sk_txhash is used
to set skb->hash which is used to spread flows across multiple TXQs.

But, the above routines are invoked before the source port of the connection
is created. Because of this all outgoing connections that just differ in the
source port get hashed into the same TXQ.

This patch fixes this problem for IPv4/6 by invoking the the above routines
after the source port is available for the socket.

Fixes: 95a595019("net: Save TX flow hash in sock and set in skbuf on xmit")
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c