aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-08 17:26:13 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-13 04:41:32 -0400
commit7a161ea92471087a1579239d7a58dd06eaa5601c (patch)
tree24dddbec359fc931e23412a27594548702197784
parentf0ee7acfcdd4169cee2fefc630de72deb5bc34b9 (diff)
net: Dont use netdev_warn()
Dont use netdev_warn() in dev_cap_txqueue() and get_rps_cpu() so that we can catch following warnings without crash. bond0.2240 received packet on queue 6, but number of RX queues is 1 bond0.2240 received packet on queue 11, but number of RX queues is 1 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/dev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a10a21619ae3..0eb79e35671f 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1987,9 +1987,9 @@ static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index)
1987{ 1987{
1988 if (unlikely(queue_index >= dev->real_num_tx_queues)) { 1988 if (unlikely(queue_index >= dev->real_num_tx_queues)) {
1989 if (net_ratelimit()) { 1989 if (net_ratelimit()) {
1990 netdev_warn(dev, "selects TX queue %d, but " 1990 pr_warning("%s selects TX queue %d, but "
1991 "real number of TX queues is %d\n", 1991 "real number of TX queues is %d\n",
1992 queue_index, dev->real_num_tx_queues); 1992 dev->name, queue_index, dev->real_num_tx_queues);
1993 } 1993 }
1994 return 0; 1994 return 0;
1995 } 1995 }
@@ -2223,9 +2223,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb)
2223 u16 index = skb_get_rx_queue(skb); 2223 u16 index = skb_get_rx_queue(skb);
2224 if (unlikely(index >= dev->num_rx_queues)) { 2224 if (unlikely(index >= dev->num_rx_queues)) {
2225 if (net_ratelimit()) { 2225 if (net_ratelimit()) {
2226 netdev_warn(dev, "received packet on queue " 2226 pr_warning("%s received packet on queue "
2227 "%u, but number of RX queues is %u\n", 2227 "%u, but number of RX queues is %u\n",
2228 index, dev->num_rx_queues); 2228 dev->name, index, dev->num_rx_queues);
2229 } 2229 }
2230 goto done; 2230 goto done;
2231 } 2231 }