Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e57b79c authored by Rick Jones's avatar Rick Jones Committed by David S. Miller
Browse files

virtio_net: do not rate limit counter increments



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: default avatarRick Jones <rick.jones2@hp.com>
Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 973db569
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -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. */
	/* This can happen with OOM and indirect buffers. */
	if (unlikely(capacity < 0)) {
	if (unlikely(capacity < 0)) {
		if (net_ratelimit()) {
		if (likely(capacity == -ENOMEM)) {
		if (likely(capacity == -ENOMEM)) {
			if (net_ratelimit()) {
				dev_warn(&dev->dev,
				dev_warn(&dev->dev,
					 "TX queue failure: out of memory\n");
					 "TX queue failure: out of memory\n");
			} else {
			} else {
			dev->stats.tx_fifo_errors++;
			dev->stats.tx_fifo_errors++;
			if (net_ratelimit())
				dev_warn(&dev->dev,
				dev_warn(&dev->dev,
					 "Unexpected TX queue failure: %d\n",
					 "Unexpected TX queue failure: %d\n",
					 capacity);
					 capacity);