aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <[email protected]>2013-09-05 21:43:59 +0300
committerRalf Baechle <[email protected]>2013-09-17 10:09:49 +0200
commitda029d0c6757972d19d88b0289ded58f4f704236 (patch)
treeeb126b4077afb8d4b1b9e7a6ca6eeceacecae126
parent272b98c6455f00884f0350f775c5342358ebb73f (diff)
staging: octeon-ethernet: make dropped packets to consume NAPI budget
We should count also dropped packets, otherwise the NAPI handler may end up running too long. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Cc: [email protected] Cc: David Daney <[email protected]> Cc: Jason A. Donenfeld <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5809/ Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r--drivers/staging/octeon/ethernet-rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 34afc16bc493..10e54165d89c 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
if (backlog > budget * cores_in_use && napi != NULL)
cvm_oct_enable_one_cpu();
}
+ rx_count++;
skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1;
if (likely(skb_in_hw)) {
@@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
#endif
}
netif_receive_skb(skb);
- rx_count++;
} else {
/* Drop any packet received for a device that isn't up */
/*