aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sfc/rx.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index 4b65c626a457..9277e9aaad09 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -445,6 +445,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
445 bool checksummed) 445 bool checksummed)
446{ 446{
447 struct napi_struct *napi = &channel->napi_str; 447 struct napi_struct *napi = &channel->napi_str;
448 gro_result_t gro_result;
448 449
449 /* Pass the skb/page into the LRO engine */ 450 /* Pass the skb/page into the LRO engine */
450 if (rx_buf->page) { 451 if (rx_buf->page) {
@@ -452,6 +453,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
452 453
453 if (!skb) { 454 if (!skb) {
454 put_page(rx_buf->page); 455 put_page(rx_buf->page);
456 gro_result = GRO_DROP;
455 goto out; 457 goto out;
456 } 458 }
457 459
@@ -467,7 +469,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
467 skb->ip_summed = 469 skb->ip_summed =
468 checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE; 470 checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE;
469 471
470 napi_gro_frags(napi); 472 gro_result = napi_gro_frags(napi);
471 473
472out: 474out:
473 EFX_BUG_ON_PARANOID(rx_buf->skb); 475 EFX_BUG_ON_PARANOID(rx_buf->skb);
@@ -476,9 +478,16 @@ out:
476 EFX_BUG_ON_PARANOID(!rx_buf->skb); 478 EFX_BUG_ON_PARANOID(!rx_buf->skb);
477 EFX_BUG_ON_PARANOID(!checksummed); 479 EFX_BUG_ON_PARANOID(!checksummed);
478 480
479 napi_gro_receive(napi, rx_buf->skb); 481 gro_result = napi_gro_receive(napi, rx_buf->skb);
480 rx_buf->skb = NULL; 482 rx_buf->skb = NULL;
481 } 483 }
484
485 if (gro_result == GRO_NORMAL) {
486 channel->rx_alloc_level += RX_ALLOC_FACTOR_SKB;
487 } else if (gro_result != GRO_DROP) {
488 channel->rx_alloc_level += RX_ALLOC_FACTOR_LRO;
489 channel->irq_mod_score += 2;
490 }
482} 491}
483 492
484void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, 493void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,