Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343353
b: refs/heads/master
c: 4997442
h: refs/heads/master
i:
  343351: 082e85b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 13, 2012
1 parent 2ca0ffe commit 4e74b86
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 026e43def736923fedb9919a0bd22fff7ba03e8b
refs/heads/master: 499744209b2cbca66c42119226e5470da3bb7040
7 changes: 4 additions & 3 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,12 @@ static void tun_flow_cleanup(unsigned long data)
spin_unlock_bh(&tun->lock);
}

static void tun_flow_update(struct tun_struct *tun, struct sk_buff *skb,
static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
u16 queue_index)
{
struct hlist_head *head;
struct tun_flow_entry *e;
unsigned long delay = tun->ageing_time;
u32 rxhash = skb_get_rxhash(skb);

if (!rxhash)
return;
Expand Down Expand Up @@ -1010,6 +1009,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
int copylen;
bool zerocopy = false;
int err;
u32 rxhash;

if (!(tun->flags & TUN_NO_PI)) {
if ((len -= sizeof(pi)) > total_len)
Expand Down Expand Up @@ -1162,12 +1162,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
skb_shinfo(skb)->tx_flags |= SKBTX_DEV_ZEROCOPY;
}

rxhash = skb_get_rxhash(skb);
netif_rx_ni(skb);

tun->dev->stats.rx_packets++;
tun->dev->stats.rx_bytes += len;

tun_flow_update(tun, skb, tfile->queue_index);
tun_flow_update(tun, rxhash, tfile->queue_index);
return total_len;
}

Expand Down

0 comments on commit 4e74b86

Please sign in to comment.