Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336253
b: refs/heads/master
c: c3c7c25
h: refs/heads/master
i:
  336251: 3b4272f
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 7, 2012
1 parent 13f6a39 commit f5dec8b
Show file tree
Hide file tree
Showing 4 changed files with 9 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: 93b174ad71b08e504c2cf6e8a58ecce778b77a40
refs/heads/master: c3c7c254b2e8cd99b0adf288c2a1bddacd7ba255
3 changes: 3 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,9 @@ struct napi_gro_cb {

/* Used in ipv6_gro_receive() */
int proto;

/* used in skb_gro_receive() slow path */
struct sk_buff *last;
};

#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3451,6 +3451,8 @@ static int napi_gro_complete(struct sk_buff *skb)
struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
int err = -ENOENT;

BUILD_BUG_ON(sizeof(struct napi_gro_cb) > sizeof(skb->cb));

if (NAPI_GRO_CB(skb)->count == 1) {
skb_shinfo(skb)->gso_size = 0;
goto out;
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3004,7 +3004,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
skb_shinfo(nskb)->gso_size = pinfo->gso_size;
pinfo->gso_size = 0;
skb_header_release(p);
nskb->prev = p;
NAPI_GRO_CB(nskb)->last = p;

nskb->data_len += p->len;
nskb->truesize += p->truesize;
Expand All @@ -3030,8 +3030,8 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)

__skb_pull(skb, offset);

p->prev->next = skb;
p->prev = skb;
NAPI_GRO_CB(p)->last->next = skb;
NAPI_GRO_CB(p)->last = skb;
skb_header_release(skb);

done:
Expand Down

0 comments on commit f5dec8b

Please sign in to comment.