提交 7a161ea9 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f0ee7acf
...@@ -1987,9 +1987,9 @@ static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index) ...@@ -1987,9 +1987,9 @@ static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index)
{ {
if (unlikely(queue_index >= dev->real_num_tx_queues)) { if (unlikely(queue_index >= dev->real_num_tx_queues)) {
if (net_ratelimit()) { if (net_ratelimit()) {
netdev_warn(dev, "selects TX queue %d, but " pr_warning("%s selects TX queue %d, but "
"real number of TX queues is %d\n", "real number of TX queues is %d\n",
queue_index, dev->real_num_tx_queues); dev->name, queue_index, dev->real_num_tx_queues);
} }
return 0; return 0;
} }
...@@ -2223,9 +2223,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb) ...@@ -2223,9 +2223,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb)
u16 index = skb_get_rx_queue(skb); u16 index = skb_get_rx_queue(skb);
if (unlikely(index >= dev->num_rx_queues)) { if (unlikely(index >= dev->num_rx_queues)) {
if (net_ratelimit()) { if (net_ratelimit()) {
netdev_warn(dev, "received packet on queue " pr_warning("%s received packet on queue "
"%u, but number of RX queues is %u\n", "%u, but number of RX queues is %u\n",
index, dev->num_rx_queues); dev->name, index, dev->num_rx_queues);
} }
goto done; goto done;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册