diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/pktgen.c | 9 |
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) | |||
1973 | 1973 | ||
1974 | /* make sure that we don't pick a non-existing transmit queue */ | 1974 | /* make sure that we don't pick a non-existing transmit queue */ |
1975 | ntxq = pkt_dev->odev->real_num_tx_queues; | 1975 | ntxq = pkt_dev->odev->real_num_tx_queues; |
1976 | if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { | 1976 | |
1977 | printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU " | ||
1978 | "disabled because CPU count (%d) exceeds number " | ||
1979 | "of tx queues (%d) on %s\n", num_online_cpus(), ntxq, | ||
1980 | pkt_dev->odev->name); | ||
1981 | pkt_dev->flags &= ~F_QUEUE_MAP_CPU; | ||
1982 | } | ||
1983 | if (ntxq <= pkt_dev->queue_map_min) { | 1977 | if (ntxq <= pkt_dev->queue_map_min) { |
1984 | printk(KERN_WARNING "pktgen: WARNING: Requested " | 1978 | printk(KERN_WARNING "pktgen: WARNING: Requested " |
1985 | "queue_map_min (zero-based) (%d) exceeds valid range " | 1979 | "queue_map_min (zero-based) (%d) exceeds valid range " |
@@ -2202,6 +2196,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev) | |||
2202 | } | 2196 | } |
2203 | pkt_dev->cur_queue_map = t; | 2197 | pkt_dev->cur_queue_map = t; |
2204 | } | 2198 | } |
2199 | pkt_dev->cur_queue_map = pkt_dev->cur_queue_map % pkt_dev->odev->real_num_tx_queues; | ||
2205 | } | 2200 | } |
2206 | 2201 | ||
2207 | /* Increment/randomize headers according to flags and current values | 2202 | /* Increment/randomize headers according to flags and current values |