aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c103
1 files changed, 57 insertions, 46 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index bca787fdbc51..be985f068e79 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -567,7 +567,7 @@ static ssize_t pgctrl_write(struct file *file, const char __user * buf,
567 pktgen_run_all_threads(); 567 pktgen_run_all_threads();
568 568
569 else 569 else
570 printk("pktgen: Unknown command: %s\n", data); 570 printk(KERN_WARNING "pktgen: Unknown command: %s\n", data);
571 571
572 err = count; 572 err = count;
573 573
@@ -908,14 +908,14 @@ static ssize_t pktgen_if_write(struct file *file,
908 pg_result = &(pkt_dev->result[0]); 908 pg_result = &(pkt_dev->result[0]);
909 909
910 if (count < 1) { 910 if (count < 1) {
911 printk("pktgen: wrong command format\n"); 911 printk(KERN_WARNING "pktgen: wrong command format\n");
912 return -EINVAL; 912 return -EINVAL;
913 } 913 }
914 914
915 max = count - i; 915 max = count - i;
916 tmp = count_trail_chars(&user_buffer[i], max); 916 tmp = count_trail_chars(&user_buffer[i], max);
917 if (tmp < 0) { 917 if (tmp < 0) {
918 printk("pktgen: illegal format\n"); 918 printk(KERN_WARNING "pktgen: illegal format\n");
919 return tmp; 919 return tmp;
920 } 920 }
921 i += tmp; 921 i += tmp;
@@ -943,7 +943,7 @@ static ssize_t pktgen_if_write(struct file *file,
943 if (copy_from_user(tb, user_buffer, count)) 943 if (copy_from_user(tb, user_buffer, count))
944 return -EFAULT; 944 return -EFAULT;
945 tb[count] = 0; 945 tb[count] = 0;
946 printk("pktgen: %s,%lu buffer -:%s:-\n", name, 946 printk(KERN_DEBUG "pktgen: %s,%lu buffer -:%s:-\n", name,
947 (unsigned long)count, tb); 947 (unsigned long)count, tb);
948 } 948 }
949 949
@@ -1248,7 +1248,7 @@ static ssize_t pktgen_if_write(struct file *file,
1248 pkt_dev->cur_daddr = pkt_dev->daddr_min; 1248 pkt_dev->cur_daddr = pkt_dev->daddr_min;
1249 } 1249 }
1250 if (debug) 1250 if (debug)
1251 printk("pktgen: dst_min set to: %s\n", 1251 printk(KERN_DEBUG "pktgen: dst_min set to: %s\n",
1252 pkt_dev->dst_min); 1252 pkt_dev->dst_min);
1253 i += len; 1253 i += len;
1254 sprintf(pg_result, "OK: dst_min=%s", pkt_dev->dst_min); 1254 sprintf(pg_result, "OK: dst_min=%s", pkt_dev->dst_min);
@@ -1271,7 +1271,7 @@ static ssize_t pktgen_if_write(struct file *file,
1271 pkt_dev->cur_daddr = pkt_dev->daddr_max; 1271 pkt_dev->cur_daddr = pkt_dev->daddr_max;
1272 } 1272 }
1273 if (debug) 1273 if (debug)
1274 printk("pktgen: dst_max set to: %s\n", 1274 printk(KERN_DEBUG "pktgen: dst_max set to: %s\n",
1275 pkt_dev->dst_max); 1275 pkt_dev->dst_max);
1276 i += len; 1276 i += len;
1277 sprintf(pg_result, "OK: dst_max=%s", pkt_dev->dst_max); 1277 sprintf(pg_result, "OK: dst_max=%s", pkt_dev->dst_max);
@@ -1294,7 +1294,7 @@ static ssize_t pktgen_if_write(struct file *file,
1294 ipv6_addr_copy(&pkt_dev->cur_in6_daddr, &pkt_dev->in6_daddr); 1294 ipv6_addr_copy(&pkt_dev->cur_in6_daddr, &pkt_dev->in6_daddr);
1295 1295
1296 if (debug) 1296 if (debug)
1297 printk("pktgen: dst6 set to: %s\n", buf); 1297 printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf);
1298 1298
1299 i += len; 1299 i += len;
1300 sprintf(pg_result, "OK: dst6=%s", buf); 1300 sprintf(pg_result, "OK: dst6=%s", buf);
@@ -1317,7 +1317,7 @@ static ssize_t pktgen_if_write(struct file *file,
1317 ipv6_addr_copy(&pkt_dev->cur_in6_daddr, 1317 ipv6_addr_copy(&pkt_dev->cur_in6_daddr,
1318 &pkt_dev->min_in6_daddr); 1318 &pkt_dev->min_in6_daddr);
1319 if (debug) 1319 if (debug)
1320 printk("pktgen: dst6_min set to: %s\n", buf); 1320 printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf);
1321 1321
1322 i += len; 1322 i += len;
1323 sprintf(pg_result, "OK: dst6_min=%s", buf); 1323 sprintf(pg_result, "OK: dst6_min=%s", buf);
@@ -1338,7 +1338,7 @@ static ssize_t pktgen_if_write(struct file *file,
1338 fmt_ip6(buf, pkt_dev->max_in6_daddr.s6_addr); 1338 fmt_ip6(buf, pkt_dev->max_in6_daddr.s6_addr);
1339 1339
1340 if (debug) 1340 if (debug)
1341 printk("pktgen: dst6_max set to: %s\n", buf); 1341 printk(KERN_DEBUG "pktgen: dst6_max set to: %s\n", buf);
1342 1342
1343 i += len; 1343 i += len;
1344 sprintf(pg_result, "OK: dst6_max=%s", buf); 1344 sprintf(pg_result, "OK: dst6_max=%s", buf);
@@ -1361,7 +1361,7 @@ static ssize_t pktgen_if_write(struct file *file,
1361 ipv6_addr_copy(&pkt_dev->cur_in6_saddr, &pkt_dev->in6_saddr); 1361 ipv6_addr_copy(&pkt_dev->cur_in6_saddr, &pkt_dev->in6_saddr);
1362 1362
1363 if (debug) 1363 if (debug)
1364 printk("pktgen: src6 set to: %s\n", buf); 1364 printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf);
1365 1365
1366 i += len; 1366 i += len;
1367 sprintf(pg_result, "OK: src6=%s", buf); 1367 sprintf(pg_result, "OK: src6=%s", buf);
@@ -1382,7 +1382,7 @@ static ssize_t pktgen_if_write(struct file *file,
1382 pkt_dev->cur_saddr = pkt_dev->saddr_min; 1382 pkt_dev->cur_saddr = pkt_dev->saddr_min;
1383 } 1383 }
1384 if (debug) 1384 if (debug)
1385 printk("pktgen: src_min set to: %s\n", 1385 printk(KERN_DEBUG "pktgen: src_min set to: %s\n",
1386 pkt_dev->src_min); 1386 pkt_dev->src_min);
1387 i += len; 1387 i += len;
1388 sprintf(pg_result, "OK: src_min=%s", pkt_dev->src_min); 1388 sprintf(pg_result, "OK: src_min=%s", pkt_dev->src_min);
@@ -1403,7 +1403,7 @@ static ssize_t pktgen_if_write(struct file *file,
1403 pkt_dev->cur_saddr = pkt_dev->saddr_max; 1403 pkt_dev->cur_saddr = pkt_dev->saddr_max;
1404 } 1404 }
1405 if (debug) 1405 if (debug)
1406 printk("pktgen: src_max set to: %s\n", 1406 printk(KERN_DEBUG "pktgen: src_max set to: %s\n",
1407 pkt_dev->src_max); 1407 pkt_dev->src_max);
1408 i += len; 1408 i += len;
1409 sprintf(pg_result, "OK: src_max=%s", pkt_dev->src_max); 1409 sprintf(pg_result, "OK: src_max=%s", pkt_dev->src_max);
@@ -1533,7 +1533,7 @@ static ssize_t pktgen_if_write(struct file *file,
1533 pkt_dev->svlan_id = 0xffff; 1533 pkt_dev->svlan_id = 0xffff;
1534 1534
1535 if (debug) 1535 if (debug)
1536 printk("pktgen: VLAN/SVLAN auto turned off\n"); 1536 printk(KERN_DEBUG "pktgen: VLAN/SVLAN auto turned off\n");
1537 } 1537 }
1538 return count; 1538 return count;
1539 } 1539 }
@@ -1548,10 +1548,10 @@ static ssize_t pktgen_if_write(struct file *file,
1548 pkt_dev->vlan_id = value; /* turn on VLAN */ 1548 pkt_dev->vlan_id = value; /* turn on VLAN */
1549 1549
1550 if (debug) 1550 if (debug)
1551 printk("pktgen: VLAN turned on\n"); 1551 printk(KERN_DEBUG "pktgen: VLAN turned on\n");
1552 1552
1553 if (debug && pkt_dev->nr_labels) 1553 if (debug && pkt_dev->nr_labels)
1554 printk("pktgen: MPLS auto turned off\n"); 1554 printk(KERN_DEBUG "pktgen: MPLS auto turned off\n");
1555 1555
1556 pkt_dev->nr_labels = 0; /* turn off MPLS */ 1556 pkt_dev->nr_labels = 0; /* turn off MPLS */
1557 sprintf(pg_result, "OK: vlan_id=%u", pkt_dev->vlan_id); 1557 sprintf(pg_result, "OK: vlan_id=%u", pkt_dev->vlan_id);
@@ -1560,7 +1560,7 @@ static ssize_t pktgen_if_write(struct file *file,
1560 pkt_dev->svlan_id = 0xffff; 1560 pkt_dev->svlan_id = 0xffff;
1561 1561
1562 if (debug) 1562 if (debug)
1563 printk("pktgen: VLAN/SVLAN turned off\n"); 1563 printk(KERN_DEBUG "pktgen: VLAN/SVLAN turned off\n");
1564 } 1564 }
1565 return count; 1565 return count;
1566 } 1566 }
@@ -1605,10 +1605,10 @@ static ssize_t pktgen_if_write(struct file *file,
1605 pkt_dev->svlan_id = value; /* turn on SVLAN */ 1605 pkt_dev->svlan_id = value; /* turn on SVLAN */
1606 1606
1607 if (debug) 1607 if (debug)
1608 printk("pktgen: SVLAN turned on\n"); 1608 printk(KERN_DEBUG "pktgen: SVLAN turned on\n");
1609 1609
1610 if (debug && pkt_dev->nr_labels) 1610 if (debug && pkt_dev->nr_labels)
1611 printk("pktgen: MPLS auto turned off\n"); 1611 printk(KERN_DEBUG "pktgen: MPLS auto turned off\n");
1612 1612
1613 pkt_dev->nr_labels = 0; /* turn off MPLS */ 1613 pkt_dev->nr_labels = 0; /* turn off MPLS */
1614 sprintf(pg_result, "OK: svlan_id=%u", pkt_dev->svlan_id); 1614 sprintf(pg_result, "OK: svlan_id=%u", pkt_dev->svlan_id);
@@ -1617,7 +1617,7 @@ static ssize_t pktgen_if_write(struct file *file,
1617 pkt_dev->svlan_id = 0xffff; 1617 pkt_dev->svlan_id = 0xffff;
1618 1618
1619 if (debug) 1619 if (debug)
1620 printk("pktgen: VLAN/SVLAN turned off\n"); 1620 printk(KERN_DEBUG "pktgen: VLAN/SVLAN turned off\n");
1621 } 1621 }
1622 return count; 1622 return count;
1623 } 1623 }
@@ -1777,10 +1777,11 @@ static ssize_t pktgen_thread_write(struct file *file,
1777 i += len; 1777 i += len;
1778 1778
1779 if (debug) 1779 if (debug)
1780 printk("pktgen: t=%s, count=%lu\n", name, (unsigned long)count); 1780 printk(KERN_DEBUG "pktgen: t=%s, count=%lu\n",
1781 name, (unsigned long)count);
1781 1782
1782 if (!t) { 1783 if (!t) {
1783 printk("pktgen: ERROR: No thread\n"); 1784 printk(KERN_ERR "pktgen: ERROR: No thread\n");
1784 ret = -EINVAL; 1785 ret = -EINVAL;
1785 goto out; 1786 goto out;
1786 } 1787 }
@@ -1891,8 +1892,8 @@ static void pktgen_mark_device(const char *ifname)
1891 mutex_lock(&pktgen_thread_lock); 1892 mutex_lock(&pktgen_thread_lock);
1892 1893
1893 if (++i >= max_tries) { 1894 if (++i >= max_tries) {
1894 printk("pktgen_mark_device: timed out after waiting " 1895 printk(KERN_ERR "pktgen_mark_device: timed out after "
1895 "%d msec for device %s to be removed\n", 1896 "waiting %d msec for device %s to be removed\n",
1896 msec_per_try * i, ifname); 1897 msec_per_try * i, ifname);
1897 break; 1898 break;
1898 } 1899 }
@@ -1962,15 +1963,15 @@ static int pktgen_setup_dev(struct pktgen_dev *pkt_dev, const char *ifname)
1962 1963
1963 odev = dev_get_by_name(ifname); 1964 odev = dev_get_by_name(ifname);
1964 if (!odev) { 1965 if (!odev) {
1965 printk("pktgen: no such netdevice: \"%s\"\n", ifname); 1966 printk(KERN_ERR "pktgen: no such netdevice: \"%s\"\n", ifname);
1966 return -ENODEV; 1967 return -ENODEV;
1967 } 1968 }
1968 1969
1969 if (odev->type != ARPHRD_ETHER) { 1970 if (odev->type != ARPHRD_ETHER) {
1970 printk("pktgen: not an ethernet device: \"%s\"\n", ifname); 1971 printk(KERN_ERR "pktgen: not an ethernet device: \"%s\"\n", ifname);
1971 err = -EINVAL; 1972 err = -EINVAL;
1972 } else if (!netif_running(odev)) { 1973 } else if (!netif_running(odev)) {
1973 printk("pktgen: device is down: \"%s\"\n", ifname); 1974 printk(KERN_ERR "pktgen: device is down: \"%s\"\n", ifname);
1974 err = -ENETDOWN; 1975 err = -ENETDOWN;
1975 } else { 1976 } else {
1976 pkt_dev->odev = odev; 1977 pkt_dev->odev = odev;
@@ -1987,7 +1988,8 @@ static int pktgen_setup_dev(struct pktgen_dev *pkt_dev, const char *ifname)
1987static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) 1988static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
1988{ 1989{
1989 if (!pkt_dev->odev) { 1990 if (!pkt_dev->odev) {
1990 printk("pktgen: ERROR: pkt_dev->odev == NULL in setup_inject.\n"); 1991 printk(KERN_ERR "pktgen: ERROR: pkt_dev->odev == NULL in "
1992 "setup_inject.\n");
1991 sprintf(pkt_dev->result, 1993 sprintf(pkt_dev->result,
1992 "ERROR: pkt_dev->odev == NULL in setup_inject.\n"); 1994 "ERROR: pkt_dev->odev == NULL in setup_inject.\n");
1993 return; 1995 return;
@@ -2049,7 +2051,8 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
2049 } 2051 }
2050 rcu_read_unlock(); 2052 rcu_read_unlock();
2051 if (err) 2053 if (err)
2052 printk("pktgen: ERROR: IPv6 link address not availble.\n"); 2054 printk(KERN_ERR "pktgen: ERROR: IPv6 link "
2055 "address not availble.\n");
2053 } 2056 }
2054#endif 2057#endif
2055 } else { 2058 } else {
@@ -2441,7 +2444,8 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev,
2441 if (nhead >0) { 2444 if (nhead >0) {
2442 ret = pskb_expand_head(skb, nhead, 0, GFP_ATOMIC); 2445 ret = pskb_expand_head(skb, nhead, 0, GFP_ATOMIC);
2443 if (ret < 0) { 2446 if (ret < 0) {
2444 printk("Error expanding ipsec packet %d\n",ret); 2447 printk(KERN_ERR "Error expanding "
2448 "ipsec packet %d\n",ret);
2445 return 0; 2449 return 0;
2446 } 2450 }
2447 } 2451 }
@@ -2450,7 +2454,8 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev,
2450 skb_pull(skb, ETH_HLEN); 2454 skb_pull(skb, ETH_HLEN);
2451 ret = pktgen_output_ipsec(skb, pkt_dev); 2455 ret = pktgen_output_ipsec(skb, pkt_dev);
2452 if (ret) { 2456 if (ret) {
2453 printk("Error creating ipsec packet %d\n",ret); 2457 printk(KERN_ERR "Error creating ipsec "
2458 "packet %d\n",ret);
2454 kfree_skb(skb); 2459 kfree_skb(skb);
2455 return 0; 2460 return 0;
2456 } 2461 }
@@ -3184,8 +3189,8 @@ static int pktgen_stop_device(struct pktgen_dev *pkt_dev)
3184 int nr_frags = pkt_dev->skb ? skb_shinfo(pkt_dev->skb)->nr_frags : -1; 3189 int nr_frags = pkt_dev->skb ? skb_shinfo(pkt_dev->skb)->nr_frags : -1;
3185 3190
3186 if (!pkt_dev->running) { 3191 if (!pkt_dev->running) {
3187 printk("pktgen: interface: %s is already stopped\n", 3192 printk(KERN_WARNING "pktgen: interface: %s is already "
3188 pkt_dev->odev->name); 3193 "stopped\n", pkt_dev->odev->name);
3189 return -EINVAL; 3194 return -EINVAL;
3190 } 3195 }
3191 3196
@@ -3360,7 +3365,8 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
3360 3365
3361 pkt_dev->skb = fill_packet(odev, pkt_dev); 3366 pkt_dev->skb = fill_packet(odev, pkt_dev);
3362 if (pkt_dev->skb == NULL) { 3367 if (pkt_dev->skb == NULL) {
3363 printk("pktgen: ERROR: couldn't allocate skb in fill_packet.\n"); 3368 printk(KERN_ERR "pktgen: ERROR: couldn't "
3369 "allocate skb in fill_packet.\n");
3364 schedule(); 3370 schedule();
3365 pkt_dev->clone_count--; /* back out increment, OOM */ 3371 pkt_dev->clone_count--; /* back out increment, OOM */
3366 goto out; 3372 goto out;
@@ -3565,7 +3571,8 @@ static int add_dev_to_thread(struct pktgen_thread *t,
3565 if_lock(t); 3571 if_lock(t);
3566 3572
3567 if (pkt_dev->pg_thread) { 3573 if (pkt_dev->pg_thread) {
3568 printk("pktgen: ERROR: already assigned to a thread.\n"); 3574 printk(KERN_ERR "pktgen: ERROR: already assigned "
3575 "to a thread.\n");
3569 rv = -EBUSY; 3576 rv = -EBUSY;
3570 goto out; 3577 goto out;
3571 } 3578 }
@@ -3590,7 +3597,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3590 3597
3591 pkt_dev = __pktgen_NN_threads(ifname, FIND); 3598 pkt_dev = __pktgen_NN_threads(ifname, FIND);
3592 if (pkt_dev) { 3599 if (pkt_dev) {
3593 printk("pktgen: ERROR: interface already used.\n"); 3600 printk(KERN_ERR "pktgen: ERROR: interface already used.\n");
3594 return -EBUSY; 3601 return -EBUSY;
3595 } 3602 }
3596 3603
@@ -3632,7 +3639,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3632 3639
3633 pkt_dev->entry = create_proc_entry(ifname, 0600, pg_proc_dir); 3640 pkt_dev->entry = create_proc_entry(ifname, 0600, pg_proc_dir);
3634 if (!pkt_dev->entry) { 3641 if (!pkt_dev->entry) {
3635 printk("pktgen: cannot create %s/%s procfs entry.\n", 3642 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n",
3636 PG_PROC_DIR, ifname); 3643 PG_PROC_DIR, ifname);
3637 err = -EINVAL; 3644 err = -EINVAL;
3638 goto out2; 3645 goto out2;
@@ -3665,7 +3672,8 @@ static int __init pktgen_create_thread(int cpu)
3665 3672
3666 t = kzalloc(sizeof(struct pktgen_thread), GFP_KERNEL); 3673 t = kzalloc(sizeof(struct pktgen_thread), GFP_KERNEL);
3667 if (!t) { 3674 if (!t) {
3668 printk("pktgen: ERROR: out of memory, can't create new thread.\n"); 3675 printk(KERN_ERR "pktgen: ERROR: out of memory, can't "
3676 "create new thread.\n");
3669 return -ENOMEM; 3677 return -ENOMEM;
3670 } 3678 }
3671 3679
@@ -3678,7 +3686,8 @@ static int __init pktgen_create_thread(int cpu)
3678 3686
3679 p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); 3687 p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu);
3680 if (IS_ERR(p)) { 3688 if (IS_ERR(p)) {
3681 printk("pktgen: kernel_thread() failed for cpu %d\n", t->cpu); 3689 printk(KERN_ERR "pktgen: kernel_thread() failed "
3690 "for cpu %d\n", t->cpu);
3682 list_del(&t->th_list); 3691 list_del(&t->th_list);
3683 kfree(t); 3692 kfree(t);
3684 return PTR_ERR(p); 3693 return PTR_ERR(p);
@@ -3688,7 +3697,7 @@ static int __init pktgen_create_thread(int cpu)
3688 3697
3689 pe = create_proc_entry(t->tsk->comm, 0600, pg_proc_dir); 3698 pe = create_proc_entry(t->tsk->comm, 0600, pg_proc_dir);
3690 if (!pe) { 3699 if (!pe) {
3691 printk("pktgen: cannot create %s/%s procfs entry.\n", 3700 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n",
3692 PG_PROC_DIR, t->tsk->comm); 3701 PG_PROC_DIR, t->tsk->comm);
3693 kthread_stop(p); 3702 kthread_stop(p);
3694 list_del(&t->th_list); 3703 list_del(&t->th_list);
@@ -3727,7 +3736,8 @@ static int pktgen_remove_device(struct pktgen_thread *t,
3727 pr_debug("pktgen: remove_device pkt_dev=%p\n", pkt_dev); 3736 pr_debug("pktgen: remove_device pkt_dev=%p\n", pkt_dev);
3728 3737
3729 if (pkt_dev->running) { 3738 if (pkt_dev->running) {
3730 printk("pktgen:WARNING: trying to remove a running interface, stopping it now.\n"); 3739 printk(KERN_WARNING "pktgen: WARNING: trying to remove a "
3740 "running interface, stopping it now.\n");
3731 pktgen_stop_device(pkt_dev); 3741 pktgen_stop_device(pkt_dev);
3732 } 3742 }
3733 3743
@@ -3759,7 +3769,7 @@ static int __init pg_init(void)
3759 int cpu; 3769 int cpu;
3760 struct proc_dir_entry *pe; 3770 struct proc_dir_entry *pe;
3761 3771
3762 printk(version); 3772 printk(KERN_INFO "%s", version);
3763 3773
3764 pg_proc_dir = proc_mkdir(PG_PROC_DIR, proc_net); 3774 pg_proc_dir = proc_mkdir(PG_PROC_DIR, proc_net);
3765 if (!pg_proc_dir) 3775 if (!pg_proc_dir)
@@ -3768,8 +3778,8 @@ static int __init pg_init(void)
3768 3778
3769 pe = create_proc_entry(PGCTRL, 0600, pg_proc_dir); 3779 pe = create_proc_entry(PGCTRL, 0600, pg_proc_dir);
3770 if (pe == NULL) { 3780 if (pe == NULL) {
3771 printk("pktgen: ERROR: cannot create %s procfs entry.\n", 3781 printk(KERN_ERR "pktgen: ERROR: cannot create %s "
3772 PGCTRL); 3782 "procfs entry.\n", PGCTRL);
3773 proc_net_remove(PG_PROC_DIR); 3783 proc_net_remove(PG_PROC_DIR);
3774 return -EINVAL; 3784 return -EINVAL;
3775 } 3785 }
@@ -3785,12 +3795,13 @@ static int __init pg_init(void)
3785 3795
3786 err = pktgen_create_thread(cpu); 3796 err = pktgen_create_thread(cpu);
3787 if (err) 3797 if (err)
3788 printk("pktgen: WARNING: Cannot create thread for cpu %d (%d)\n", 3798 printk(KERN_WARNING "pktgen: WARNING: Cannot create "
3789 cpu, err); 3799 "thread for cpu %d (%d)\n", cpu, err);
3790 } 3800 }
3791 3801
3792 if (list_empty(&pktgen_threads)) { 3802 if (list_empty(&pktgen_threads)) {
3793 printk("pktgen: ERROR: Initialization failed for all threads\n"); 3803 printk(KERN_ERR "pktgen: ERROR: Initialization failed for "
3804 "all threads\n");
3794 unregister_netdevice_notifier(&pktgen_notifier_block); 3805 unregister_netdevice_notifier(&pktgen_notifier_block);
3795 remove_proc_entry(PGCTRL, pg_proc_dir); 3806 remove_proc_entry(PGCTRL, pg_proc_dir);
3796 proc_net_remove(PG_PROC_DIR); 3807 proc_net_remove(PG_PROC_DIR);