Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171079
b: refs/heads/master
c: 18e1d2b
h: refs/heads/master
i:
  171077: d3f82cd
  171075: 82e8a93
  171071: f4273b4
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Oct 30, 2009
1 parent fae3bb5 commit d3cc83e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: c7c4b3b6e976b95facbb723951bdcd554a3530a4
refs/heads/master: 18e1d2beb6c2307d3cab7ecb44fd3d4382adcf6a
13 changes: 11 additions & 2 deletions trunk/drivers/net/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,15 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
bool checksummed)
{
struct napi_struct *napi = &channel->napi_str;
gro_result_t gro_result;

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

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

Expand All @@ -467,7 +469,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
skb->ip_summed =
checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE;

napi_gro_frags(napi);
gro_result = napi_gro_frags(napi);

out:
EFX_BUG_ON_PARANOID(rx_buf->skb);
Expand All @@ -476,9 +478,16 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
EFX_BUG_ON_PARANOID(!rx_buf->skb);
EFX_BUG_ON_PARANOID(!checksummed);

napi_gro_receive(napi, rx_buf->skb);
gro_result = napi_gro_receive(napi, rx_buf->skb);
rx_buf->skb = NULL;
}

if (gro_result == GRO_NORMAL) {
channel->rx_alloc_level += RX_ALLOC_FACTOR_SKB;
} else if (gro_result != GRO_DROP) {
channel->rx_alloc_level += RX_ALLOC_FACTOR_LRO;
channel->irq_mod_score += 2;
}
}

void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
Expand Down

0 comments on commit d3cc83e

Please sign in to comment.