1 From patchwork Thu Sep 5 18:43:59 2013
2 Content-Type: text/plain; charset="utf-8"
4 Content-Transfer-Encoding: 7bit
5 Subject: [1/3] staging: octeon-ethernet: make dropped packets to consume NAPI
7 From: Aaro Koskinen <aaro.koskinen@iki.fi>
9 Message-Id: <1378406641-16530-2-git-send-email-aaro.koskinen@iki.fi>
10 To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
11 devel@driverdev.osuosl.org, linux-mips@linux-mips.org
12 Cc: David Daney <david.daney@cavium.com>,
13 "Jason A. Donenfeld" <Jason@zx2c4.com>, richard@nod.at,
14 Aaro Koskinen <aaro.koskinen@iki.fi>
15 Date: Thu, 5 Sep 2013 21:43:59 +0300
17 We should count also dropped packets, otherwise the NAPI handler may
18 end up running too long.
20 Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
23 drivers/staging/octeon/ethernet-rx.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
26 diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
27 index 34afc16..10e5416 100644
28 --- a/drivers/staging/octeon/ethernet-rx.c
29 +++ b/drivers/staging/octeon/ethernet-rx.c
30 @@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
31 if (backlog > budget * cores_in_use && napi != NULL)
32 cvm_oct_enable_one_cpu();
36 skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1;
37 if (likely(skb_in_hw)) {
38 @@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
41 netif_receive_skb(skb);
44 /* Drop any packet received for a device that isn't up */