projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
973db56
)
virtio_net: do not rate limit counter increments
author
Rick Jones
<
[email protected]
>
Tue, 27 Mar 2012 07:28:09 +0000
(07:28 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 28 Mar 2012 08:40:45 +0000
(
04:40
-0400)
While it is desirable to rate limit certain messages, it is not
desirable to rate limit the incrementing of counters associated
with those messages.
Signed-off-by: Rick Jones <
[email protected]
>
Acked-by: Rusty Russell <
[email protected]
>
Acked-by: Michael S. Tsirkin <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/virtio_net.c
patch
|
blob
|
history
diff --git
a/drivers/net/virtio_net.c
b/drivers/net/virtio_net.c
index 019da012669fe724ecb0bf37f31df7da10c7df2f..4de2760c593762634f0925cf9ccb1ab9c7f2c111 100644
(file)
--- a/
drivers/net/virtio_net.c
+++ b/
drivers/net/virtio_net.c
@@
-625,12
+625,13
@@
static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
/* This can happen with OOM and indirect buffers. */
if (unlikely(capacity < 0)) {
- if (
net_ratelimit(
)) {
- if (
likely(capacity == -ENOMEM
)) {
+ if (
likely(capacity == -ENOMEM
)) {
+ if (
net_ratelimit(
)) {
dev_warn(&dev->dev,
"TX queue failure: out of memory\n");
} else {
- dev->stats.tx_fifo_errors++;
+ dev->stats.tx_fifo_errors++;
+ if (net_ratelimit())
dev_warn(&dev->dev,
"Unexpected TX queue failure: %d\n",
capacity);