Commit 08c801f8 authored by Tim Gardner's avatar Tim Gardner

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: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
parent 327723ed
...@@ -2253,11 +2253,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, ...@@ -2253,11 +2253,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
if (skb_rx_queue_recorded(skb)) { if (skb_rx_queue_recorded(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()) { WARN_ONCE(dev->num_rx_queues > 1, "%s received packet "
pr_warning("%s received packet on queue " "on queue %u, but number of RX queues is %u\n",
"%u, but number of RX queues is %u\n", dev->name, index, dev->num_rx_queues);
dev->name, index, dev->num_rx_queues);
}
goto done; goto done;
} }
rxqueue = dev->_rx + index; rxqueue = dev->_rx + index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment