Skip to contentSkip to conversation

ethernet/arc/arc_emac - fix NAPI "work > weight" warning

PATCH Applied Alexey Brodkin 2 participants 2 messages Aug 13, 2013 – Aug 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethernet/arc/arc_emac - fix NAPI "work > weight" warning

Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight").

This was really harmless but seeing WARN_ON_ONCE on every device boot is not nice. So trivial fix ("<" instead of "<=") is here.

Cc Vineet Gupta <[email protected]>
Cc Mischa Jonker <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc Paul Gortmaker <[email protected]>
Cc "David S. Miller" <[email protected]>
---
 drivers/net/ethernet/arc/emac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/arc/emac_main.c +1 -1
index f1b121e..55d79cb 100644
@@ -199,7 +199,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
 	struct arc_emac_priv *priv = netdev_priv(ndev);
 	unsigned int work_done;
 
-	for (work_done = 0; work_done <= budget; work_done++) {
+	for (work_done = 0; work_done < budget; work_done++) {
 		unsigned int *last_rx_bd = &priv->last_rx_bd;
 		struct net_device_stats *stats = &priv->stats;
 		struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd];
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw

From: Alexey Brodkin <[email protected]>
Date: Tue, 13 Aug 2013 17:04:36 +0400

Quoted 8 lines

Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight").

This was really harmless but seeing WARN_ON_ONCE on every device boot is not nice. So trivial fix ("<" instead of "<=") is here.

Applied, thanks.