diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
commit | a1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch) | |
tree | c0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /net/core/pktgen.c | |
parent | 275f165fa970174f8a98205529750e8abb6c0a33 (diff) | |
parent | a432226614c5616e3cfd211e0acffa0acfb4770c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 18dd83c2ead0..fa4973bf73e9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -1972,28 +1972,27 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
1972 | 1972 | ||
1973 | /* make sure that we don't pick a non-existing transmit queue */ | 1973 | /* make sure that we don't pick a non-existing transmit queue */ |
1974 | ntxq = pkt_dev->odev->real_num_tx_queues; | 1974 | ntxq = pkt_dev->odev->real_num_tx_queues; |
1975 | if (ntxq <= num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { | 1975 | if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { |
1976 | printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU " | 1976 | printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU " |
1977 | "disabled because CPU count (%d) exceeds number ", | 1977 | "disabled because CPU count (%d) exceeds number " |
1978 | num_online_cpus()); | 1978 | "of tx queues (%d) on %s\n", num_online_cpus(), ntxq, |
1979 | printk(KERN_WARNING "pktgen: WARNING: of tx queues " | 1979 | pkt_dev->odev->name); |
1980 | "(%d) on %s \n", ntxq, pkt_dev->odev->name); | ||
1981 | pkt_dev->flags &= ~F_QUEUE_MAP_CPU; | 1980 | pkt_dev->flags &= ~F_QUEUE_MAP_CPU; |
1982 | } | 1981 | } |
1983 | if (ntxq <= pkt_dev->queue_map_min) { | 1982 | if (ntxq <= pkt_dev->queue_map_min) { |
1984 | printk(KERN_WARNING "pktgen: WARNING: Requested " | 1983 | printk(KERN_WARNING "pktgen: WARNING: Requested " |
1985 | "queue_map_min (%d) exceeds number of tx\n", | 1984 | "queue_map_min (zero-based) (%d) exceeds valid range " |
1986 | pkt_dev->queue_map_min); | 1985 | "[0 - %d] for (%d) queues on %s, resetting\n", |
1987 | printk(KERN_WARNING "pktgen: WARNING: queues (%d) on " | 1986 | pkt_dev->queue_map_min, (ntxq ?: 1)- 1, ntxq, |
1988 | "%s, resetting\n", ntxq, pkt_dev->odev->name); | 1987 | pkt_dev->odev->name); |
1989 | pkt_dev->queue_map_min = ntxq - 1; | 1988 | pkt_dev->queue_map_min = ntxq - 1; |
1990 | } | 1989 | } |
1991 | if (ntxq <= pkt_dev->queue_map_max) { | 1990 | if (pkt_dev->queue_map_max >= ntxq) { |
1992 | printk(KERN_WARNING "pktgen: WARNING: Requested " | 1991 | printk(KERN_WARNING "pktgen: WARNING: Requested " |
1993 | "queue_map_max (%d) exceeds number of tx\n", | 1992 | "queue_map_max (zero-based) (%d) exceeds valid range " |
1994 | pkt_dev->queue_map_max); | 1993 | "[0 - %d] for (%d) queues on %s, resetting\n", |
1995 | printk(KERN_WARNING "pktgen: WARNING: queues (%d) on " | 1994 | pkt_dev->queue_map_max, (ntxq ?: 1)- 1, ntxq, |
1996 | "%s, resetting\n", ntxq, pkt_dev->odev->name); | 1995 | pkt_dev->odev->name); |
1997 | pkt_dev->queue_map_max = ntxq - 1; | 1996 | pkt_dev->queue_map_max = ntxq - 1; |
1998 | } | 1997 | } |
1999 | 1998 | ||