>From 02598ea1409568654a554fae3ac2c22ecc2474d0 Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Tue, 8 Jun 2010 17:51:27 -0600 Subject: [PATCH] net: Print num_rx_queues imbalance warning only when there are allocated queues BugLink: http://bugs.launchpad.net/bugs/591416 So far no users of skb_record_rx_queue() use alloc_netdev_mq() for network device initialization, so don't print a warning about num_rx_queues imbalances in get_rps_cpu() unless they have actually been allocated. Signed-off-by: Tim Gardner --- net/core/dev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index d03470f..0852608 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2253,7 +2253,7 @@ 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()) { + if (dev->num_rx_queues > 1 && 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); -- 1.7.0.4