From d3cc83ea7408c192e08c1e7e5d65aab8707e1814 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 29 Oct 2009 07:21:24 +0000 Subject: [PATCH] --- yaml --- r: 171079 b: refs/heads/master c: 18e1d2beb6c2307d3cab7ecb44fd3d4382adcf6a h: refs/heads/master i: 171077: d3f82cdd8cb78093e9a90debf40c2fafd0d703de 171075: 82e8a9329e1a31c55efe948a59c5275cc5804ae2 171071: f4273b45251b6d3df7143e6269cb34b8d5247071 v: v3 --- [refs] | 2 +- trunk/drivers/net/sfc/rx.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9f94df960d3c..a987960accc9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c7c4b3b6e976b95facbb723951bdcd554a3530a4 +refs/heads/master: 18e1d2beb6c2307d3cab7ecb44fd3d4382adcf6a diff --git a/trunk/drivers/net/sfc/rx.c b/trunk/drivers/net/sfc/rx.c index 4b65c626a457..9277e9aaad09 100644 --- a/trunk/drivers/net/sfc/rx.c +++ b/trunk/drivers/net/sfc/rx.c @@ -445,6 +445,7 @@ 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) { @@ -452,6 +453,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel, if (!skb) { put_page(rx_buf->page); + gro_result = GRO_DROP; goto out; } @@ -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); @@ -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,