Skip to content

Commit

Permalink
net: Print num_rx_queues imbalance warning only when there are alloca…
Browse files Browse the repository at this point in the history
…ted 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 <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
  • Loading branch information
rtg-canonical committed Jun 9, 2010
1 parent 327723e commit 08c801f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08c801f

Please sign in to comment.