• S
    net: fix saving TX flow hash in sock for outgoing connections · 9e7ceb06
    Sathya Perla 提交于
    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: b73c3d0e("net: Save TX flow hash in sock and set in skbuf on xmit")
    Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
    Acked-by: NEric Dumazet <edumazet@google.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    9e7ceb06
tcp_ipv6.c 50.0 KB