Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150523
b: refs/heads/master
c: cb18978
h: refs/heads/master
i:
  150521: 74a9185
  150519: f04679a
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 27, 2009
1 parent 2fd7a46 commit 9a299aa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 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: 1075f3f65d0e0f49351b7d4310e9f94483972a51
refs/heads/master: cb18978cbf454c236db5e4191a12ef71eef9b3a0
23 changes: 19 additions & 4 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2452,10 +2452,25 @@ int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
ret = GRO_HELD;

pull:
if (unlikely(!pskb_may_pull(skb, skb_gro_offset(skb)))) {
if (napi->gro_list == skb)
napi->gro_list = skb->next;
ret = GRO_DROP;
if (skb_headlen(skb) < skb_gro_offset(skb)) {
int grow = skb_gro_offset(skb) - skb_headlen(skb);

BUG_ON(skb->end - skb->tail < grow);

memcpy(skb_tail_pointer(skb), NAPI_GRO_CB(skb)->frag0, grow);

skb->tail += grow;
skb->data_len -= grow;

skb_shinfo(skb)->frags[0].page_offset += grow;
skb_shinfo(skb)->frags[0].size -= grow;

if (unlikely(!skb_shinfo(skb)->frags[0].size)) {
put_page(skb_shinfo(skb)->frags[0].page);
memmove(skb_shinfo(skb)->frags,
skb_shinfo(skb)->frags + 1,
--skb_shinfo(skb)->nr_frags);
}
}

ok:
Expand Down

0 comments on commit 9a299aa

Please sign in to comment.