summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Olsson <robert.olsson@its.uu.se>2008-11-19 14:09:47 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-19 14:09:47 -0800
commitbfdbc0acadcc761b94814d78f0acec90f0d760de (patch)
tree663acbd95be8072e4dfc75ee418796135dfce8dd
parentc3e388964baa00d8c3960f23e8c8a1fb3966759e (diff)
downloadlinux-bfdbc0acadcc761b94814d78f0acec90f0d760de.tar.gz
linux-bfdbc0acadcc761b94814d78f0acec90f0d760de.tar.bz2
linux-bfdbc0acadcc761b94814d78f0acec90f0d760de.zip
pktgen: fix multiple queue warning
As number of TX queues in unrelated to number of CPU's we remove this test and just make sure nxtq never gets exceeded. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/pktgen.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a47f5bad110d..8997e912aaaf 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1973,13 +1973,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
/* make sure that we don't pick a non-existing transmit queue */
ntxq = pkt_dev->odev->real_num_tx_queues;
- if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) {
- printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU "
- "disabled because CPU count (%d) exceeds number "
- "of tx queues (%d) on %s\n", num_online_cpus(), ntxq,
- pkt_dev->odev->name);
- pkt_dev->flags &= ~F_QUEUE_MAP_CPU;
- }
+
if (ntxq <= pkt_dev->queue_map_min) {
printk(KERN_WARNING "pktgen: WARNING: Requested "
"queue_map_min (zero-based) (%d) exceeds valid range "
@@ -2202,6 +2196,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
}
pkt_dev->cur_queue_map = t;
}
+ pkt_dev->cur_queue_map = pkt_dev->cur_queue_map % pkt_dev->odev->real_num_tx_queues;
}
/* Increment/randomize headers according to flags and current values