Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300209
b: refs/heads/master
c: c53cff5
h: refs/heads/master
i:
  300207: ac46d38
v: v3
  • Loading branch information
Basil Gor authored and David S. Miller committed May 11, 2012
1 parent c3cabdf commit 91f154f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 13a8e0c8cdb43982372bd6c65fb26839c8fd8ce9
refs/heads/master: c53cff5e42a06b81495983bd01741b9a954f11f0
7 changes: 6 additions & 1 deletion trunk/drivers/vhost/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/if_arp.h>
#include <linux/if_tun.h>
#include <linux/if_macvlan.h>
#include <linux/if_vlan.h>

#include <net/sock.h>

Expand Down Expand Up @@ -283,8 +284,12 @@ static int peek_head_len(struct sock *sk)

spin_lock_irqsave(&sk->sk_receive_queue.lock, flags);
head = skb_peek(&sk->sk_receive_queue);
if (likely(head))
if (likely(head)) {
len = head->len;
if (vlan_tx_tag_present(head))
len += VLAN_HLEN;
}

spin_unlock_irqrestore(&sk->sk_receive_queue.lock, flags);
return len;
}
Expand Down

0 comments on commit 91f154f

Please sign in to comment.