diff options
author | David S. Miller <davem@davemloft.net> | 2009-01-28 00:27:48 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-28 00:27:48 (GMT) |
commit | f7105d63940899ece79bda024f668e6c761cfebf (patch) | |
tree | 921e574efcbb30eea0004d4a042f78cc8b97abfe /net/core/dev.c | |
parent | 0c8dfc830aadd978e461dad66c33741b71c6a0be (diff) | |
download | linux-fsl-qoriq-f7105d63940899ece79bda024f668e6c761cfebf.tar.xz |
net: If SKB has attached socket, use socket's hash for TX queue selection.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b21ad0b..cb8caa9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1729,6 +1729,13 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) goto out; } + if (skb->sk && skb->sk->sk_hash) { + u32 val = skb->sk->sk_hash; + + hash = jhash_1word(val, simple_tx_hashrnd); + goto out; + } + switch (skb->protocol) { case htons(ETH_P_IP): if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET))) |