Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201084
b: refs/heads/master
c: 87fd308
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 14, 2010
1 parent 379b98a commit e2de5f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a047bf87b1b6f69c62ab9fb28072c639cb7e2fa
refs/heads/master: 87fd308cfc6b2e880bf717a740bd5c58d2aed10c
13 changes: 10 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,8 +1911,16 @@ static int dev_gso_segment(struct sk_buff *skb)
*/
static inline void skb_orphan_try(struct sk_buff *skb)
{
if (!skb_tx(skb)->flags)
struct sock *sk = skb->sk;

if (sk && !skb_tx(skb)->flags) {
/* skb_tx_hash() wont be able to get sk.
* We copy sk_hash into skb->rxhash
*/
if (!skb->rxhash)
skb->rxhash = sk->sk_hash;
skb_orphan(skb);
}
}

int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
Expand Down Expand Up @@ -1998,8 +2006,7 @@ u16 skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb)
if (skb->sk && skb->sk->sk_hash)
hash = skb->sk->sk_hash;
else
hash = (__force u16) skb->protocol;

hash = (__force u16) skb->protocol ^ skb->rxhash;
hash = jhash_1word(hash, hashrnd);

return (u16) (((u64) hash * dev->real_num_tx_queues) >> 32);
Expand Down

0 comments on commit e2de5f7

Please sign in to comment.