aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 5f043d346694..00116d8b3b28 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3065,12 +3065,9 @@ static int __init pg_init(void)
/* Register us to receive netdevice events */
register_netdevice_notifier(&pktgen_notifier_block);
- for (cpu = 0; cpu < NR_CPUS ; cpu++) {
+ for_each_online_cpu(cpu) {
char buf[30];
- if (!cpu_online(cpu))
- continue;
-
sprintf(buf, "kpktgend_%i", cpu);
pktgen_create_thread(buf, cpu);
}