Skip to content

Commit

Permalink
net: If SKB has attached socket, use socket's hash for TX queue selec…
Browse files Browse the repository at this point in the history
…tion.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 28, 2009
1 parent 0c8dfc8 commit f7105d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit f7105d6

Please sign in to comment.