net: If SKB has attached socket, use socket's hash for TX queue selection.
Signed-off-by: David S. Miller <davem@davemloft.net>
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 @@
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)))