]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: provide skb->hash to synack packets
authorEric Dumazet <edumazet@google.com>
Tue, 15 Sep 2015 22:24:20 +0000 (15:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2015 04:01:04 +0000 (21:01 -0700)
commita75b22aaa10e536a09215bb463a557afe399ca02
tree1949d88eb7d541878079ddafa607c31017099349
parenta422fe2e2ba185f7305f25c7b409c8a452f9777c
tcp: provide skb->hash to synack packets

In commit 7ca6a9f139ea ("net: Save TX flow hash in sock and set in skbuf
on xmit"), Tom provided a l4 hash to most outgoing TCP packets.

We'd like to provide one as well for SYNACK packets, so that all packets
of a given flow share same txhash, to later enable bonding driver to
also use skb->hash to perform slave selection.

Note that a SYNACK retransmit shuffles the tx hash, as Tom did
in commit 98e4f5d8aa0e7 ("net: Recompute sk_txhash on negative routing
advice") for established sockets.

This has nice effect making TCP flows resilient to some kind of black
holes, even at connection establish phase.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
include/net/sock.h
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv6/tcp_ipv6.c