Commit da029d0c authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Ralf Baechle

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: default avatarAaro 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 272b98c6
...@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) ...@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
if (backlog > budget * cores_in_use && napi != NULL) if (backlog > budget * cores_in_use && napi != NULL)
cvm_oct_enable_one_cpu(); cvm_oct_enable_one_cpu();
} }
rx_count++;
skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1; skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1;
if (likely(skb_in_hw)) { if (likely(skb_in_hw)) {
...@@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) ...@@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
#endif #endif
} }
netif_receive_skb(skb); netif_receive_skb(skb);
rx_count++;
} else { } else {
/* Drop any packet received for a device that isn't up */ /* Drop any packet received for a device that isn't up */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment