summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2010-06-08 17:51:27 -0600
committerTim Gardner <tim.gardner@canonical.com>2010-06-09 13:46:03 -0600
commit08c801f8d45387a1b46066aad1789a9bb9c4b645 (patch)
treed82ec32778a908f5cd75a102d3d9dc4949986b22 /net
parent327723edebbbd621ed35b0d63073685eb225563e (diff)
downloadop-kernel-dev-08c801f8d45387a1b46066aad1789a9bb9c4b645.zip
op-kernel-dev-08c801f8d45387a1b46066aad1789a9bb9c4b645.tar.gz
net: Print num_rx_queues imbalance warning only when there are allocated queues
BugLink: http://bugs.launchpad.net/bugs/591416 There are a number of network drivers (bridge, bonding, etc) that are not yet receive multi-queue enabled and use alloc_netdev(), so don't print a num_rx_queues imbalance warning in that case. Also, only print the warning once for those drivers that _are_ multi-queue enabled. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index d03470f..14a8568 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2253,11 +2253,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
if (skb_rx_queue_recorded(skb)) {
u16 index = skb_get_rx_queue(skb);
if (unlikely(index >= dev->num_rx_queues)) {
- if (net_ratelimit()) {
- pr_warning("%s received packet on queue "
- "%u, but number of RX queues is %u\n",
- dev->name, index, dev->num_rx_queues);
- }
+ WARN_ONCE(dev->num_rx_queues > 1, "%s received packet "
+ "on queue %u, but number of RX queues is %u\n",
+ dev->name, index, dev->num_rx_queues);
goto done;
}
rxqueue = dev->_rx + index;
OpenPOWER on IntegriCloud