pktgen.c (12e1872328e7055d06e539f1b687dc3d0610855c) pktgen.c (8024bb245408060bec8393469e945b541a9b0865)
1/*
2 * Authors:
3 * Copyright 2001, 2002 by Robert Olsson <robert.olsson@its.uu.se>
4 * Uppsala University and
5 * Swedish University of Agricultural Sciences
6 *
7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
8 * Ben Greear <greearb@candelatech.com>

--- 3202 unchanged lines hidden (view full) ---

3211
3212 pe->proc_fops = &pktgen_fops;
3213 pe->data = NULL;
3214
3215 /* Register us to receive netdevice events */
3216 register_netdevice_notifier(&pktgen_notifier_block);
3217
3218 for_each_online_cpu(cpu) {
1/*
2 * Authors:
3 * Copyright 2001, 2002 by Robert Olsson <robert.olsson@its.uu.se>
4 * Uppsala University and
5 * Swedish University of Agricultural Sciences
6 *
7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
8 * Ben Greear <greearb@candelatech.com>

--- 3202 unchanged lines hidden (view full) ---

3211
3212 pe->proc_fops = &pktgen_fops;
3213 pe->data = NULL;
3214
3215 /* Register us to receive netdevice events */
3216 register_netdevice_notifier(&pktgen_notifier_block);
3217
3218 for_each_online_cpu(cpu) {
3219 int err;
3219 char buf[30];
3220
3221 sprintf(buf, "kpktgend_%i", cpu);
3220 char buf[30];
3221
3222 sprintf(buf, "kpktgend_%i", cpu);
3222 pktgen_create_thread(buf, cpu);
3223 err = pktgen_create_thread(buf, cpu);
3224 if (err)
3225 printk("pktgen: WARNING: Cannot create thread for cpu %d (%d)\n",
3226 cpu, err);
3223 }
3227 }
3228
3229 if (list_empty(&pktgen_threads)) {
3230 printk("pktgen: ERROR: Initialization failed for all threads\n");
3231 unregister_netdevice_notifier(&pktgen_notifier_block);
3232 remove_proc_entry(PGCTRL, pg_proc_dir);
3233 proc_net_remove(PG_PROC_DIR);
3234 return -ENODEV;
3235 }
3236
3224 return 0;
3225}
3226
3227static void __exit pg_cleanup(void)
3228{
3229 struct pktgen_thread *t;
3230 struct list_head *q, *n;
3231 wait_queue_head_t queue;

--- 29 unchanged lines hidden ---
3237 return 0;
3238}
3239
3240static void __exit pg_cleanup(void)
3241{
3242 struct pktgen_thread *t;
3243 struct list_head *q, *n;
3244 wait_queue_head_t queue;

--- 29 unchanged lines hidden ---