Skip to content

Commit

Permalink
staging: octeon-ethernet: make dropped packets to consume NAPI budget
Browse files Browse the repository at this point in the history
We should count also dropped packets, otherwise the NAPI handler may
end up running too long.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: richard@nod.at
Patchwork: https://patchwork.linux-mips.org/patch/5809/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Aaro Koskinen authored and Ralf Baechle committed Sep 17, 2013
1 parent 272b98c commit da029d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/octeon/ethernet-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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 */
/*
Expand Down

0 comments on commit da029d0

Please sign in to comment.