Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171812
b: refs/heads/master
c: 1241e95
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Nov 24, 2009
1 parent 9b288b8 commit 5c4b120
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 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: 3139e62827b9f2b9b553816de664edfe4573c954
refs/heads/master: 1241e951af060c16cd851a83a045ca3a80288383
26 changes: 14 additions & 12 deletions trunk/drivers/net/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,19 @@ static void efx_rx_packet_lro(struct efx_channel *channel,

/* Pass the skb/page into the LRO engine */
if (rx_buf->page) {
struct sk_buff *skb = napi_get_frags(napi);
struct page *page = rx_buf->page;
struct sk_buff *skb;

EFX_BUG_ON_PARANOID(rx_buf->skb);
rx_buf->page = NULL;

skb = napi_get_frags(napi);
if (!skb) {
put_page(rx_buf->page);
gro_result = GRO_DROP;
goto out;
put_page(page);
return;
}

skb_shinfo(skb)->frags[0].page = rx_buf->page;
skb_shinfo(skb)->frags[0].page = page;
skb_shinfo(skb)->frags[0].page_offset =
efx_rx_buf_offset(rx_buf);
skb_shinfo(skb)->frags[0].size = rx_buf->len;
Expand All @@ -470,16 +474,14 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE;

gro_result = napi_gro_frags(napi);

out:
EFX_BUG_ON_PARANOID(rx_buf->skb);
rx_buf->page = NULL;
} else {
EFX_BUG_ON_PARANOID(!rx_buf->skb);
EFX_BUG_ON_PARANOID(!checksummed);
struct sk_buff *skb = rx_buf->skb;

gro_result = napi_gro_receive(napi, rx_buf->skb);
EFX_BUG_ON_PARANOID(!skb);
EFX_BUG_ON_PARANOID(!checksummed);
rx_buf->skb = NULL;

gro_result = napi_gro_receive(napi, skb);
}

if (gro_result == GRO_NORMAL) {
Expand Down

0 comments on commit 5c4b120

Please sign in to comment.