diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-03-04 19:06:47 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:23:28 -0400 |
commit | 25c4e53a4c9bfe45be52821f54ec5ce957519db2 (patch) | |
tree | 6dcb76921197aca57aa6e7b8553c666e407520fe /net | |
parent | fa438ccfdfd3f6db02c13b61b21454eb81cd6a13 (diff) |
[PKTGEN]: use pr_debug
Remove private debug macro and replace with standard version
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 4b01496dc33d..a6bdcb0d43d9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -164,9 +164,6 @@ | |||
164 | 164 | ||
165 | #define VERSION "pktgen v2.68: Packet Generator for packet performance testing.\n" | 165 | #define VERSION "pktgen v2.68: Packet Generator for packet performance testing.\n" |
166 | 166 | ||
167 | /* #define PG_DEBUG(a) a */ | ||
168 | #define PG_DEBUG(a) | ||
169 | |||
170 | /* The buckets are exponential in 'width' */ | 167 | /* The buckets are exponential in 'width' */ |
171 | #define LAT_BUCKETS_MAX 32 | 168 | #define LAT_BUCKETS_MAX 32 |
172 | #define IP_NAME_SZ 32 | 169 | #define IP_NAME_SZ 32 |
@@ -1857,8 +1854,7 @@ static int pktgen_mark_device(const char *ifname) | |||
1857 | int ret = 0; | 1854 | int ret = 0; |
1858 | 1855 | ||
1859 | mutex_lock(&pktgen_thread_lock); | 1856 | mutex_lock(&pktgen_thread_lock); |
1860 | PG_DEBUG(printk("pktgen: pktgen_mark_device marking %s for removal\n", | 1857 | pr_debug("pktgen: pktgen_mark_device marking %s for removal\n", ifname); |
1861 | ifname)); | ||
1862 | 1858 | ||
1863 | while (1) { | 1859 | while (1) { |
1864 | 1860 | ||
@@ -1867,8 +1863,8 @@ static int pktgen_mark_device(const char *ifname) | |||
1867 | break; /* success */ | 1863 | break; /* success */ |
1868 | 1864 | ||
1869 | mutex_unlock(&pktgen_thread_lock); | 1865 | mutex_unlock(&pktgen_thread_lock); |
1870 | PG_DEBUG(printk("pktgen: pktgen_mark_device waiting for %s " | 1866 | pr_debug("pktgen: pktgen_mark_device waiting for %s " |
1871 | "to disappear....\n", ifname)); | 1867 | "to disappear....\n", ifname); |
1872 | schedule_timeout_interruptible(msecs_to_jiffies(msec_per_try)); | 1868 | schedule_timeout_interruptible(msecs_to_jiffies(msec_per_try)); |
1873 | mutex_lock(&pktgen_thread_lock); | 1869 | mutex_lock(&pktgen_thread_lock); |
1874 | 1870 | ||
@@ -2848,7 +2844,7 @@ static void pktgen_run(struct pktgen_thread *t) | |||
2848 | struct pktgen_dev *pkt_dev; | 2844 | struct pktgen_dev *pkt_dev; |
2849 | int started = 0; | 2845 | int started = 0; |
2850 | 2846 | ||
2851 | PG_DEBUG(printk("pktgen: entering pktgen_run. %p\n", t)); | 2847 | pr_debug("pktgen: entering pktgen_run. %p\n", t); |
2852 | 2848 | ||
2853 | if_lock(t); | 2849 | if_lock(t); |
2854 | list_for_each_entry(pkt_dev, &t->if_list, list) { | 2850 | list_for_each_entry(pkt_dev, &t->if_list, list) { |
@@ -2880,7 +2876,7 @@ static void pktgen_stop_all_threads_ifs(void) | |||
2880 | { | 2876 | { |
2881 | struct pktgen_thread *t; | 2877 | struct pktgen_thread *t; |
2882 | 2878 | ||
2883 | PG_DEBUG(printk("pktgen: entering pktgen_stop_all_threads_ifs.\n")); | 2879 | pr_debug("pktgen: entering pktgen_stop_all_threads_ifs.\n"); |
2884 | 2880 | ||
2885 | mutex_lock(&pktgen_thread_lock); | 2881 | mutex_lock(&pktgen_thread_lock); |
2886 | 2882 | ||
@@ -2948,7 +2944,7 @@ static void pktgen_run_all_threads(void) | |||
2948 | { | 2944 | { |
2949 | struct pktgen_thread *t; | 2945 | struct pktgen_thread *t; |
2950 | 2946 | ||
2951 | PG_DEBUG(printk("pktgen: entering pktgen_run_all_threads.\n")); | 2947 | pr_debug("pktgen: entering pktgen_run_all_threads.\n"); |
2952 | 2948 | ||
2953 | mutex_lock(&pktgen_thread_lock); | 2949 | mutex_lock(&pktgen_thread_lock); |
2954 | 2950 | ||
@@ -3040,7 +3036,7 @@ static void pktgen_stop(struct pktgen_thread *t) | |||
3040 | { | 3036 | { |
3041 | struct pktgen_dev *pkt_dev; | 3037 | struct pktgen_dev *pkt_dev; |
3042 | 3038 | ||
3043 | PG_DEBUG(printk("pktgen: entering pktgen_stop\n")); | 3039 | pr_debug("pktgen: entering pktgen_stop\n"); |
3044 | 3040 | ||
3045 | if_lock(t); | 3041 | if_lock(t); |
3046 | 3042 | ||
@@ -3064,7 +3060,7 @@ static void pktgen_rem_one_if(struct pktgen_thread *t) | |||
3064 | struct list_head *q, *n; | 3060 | struct list_head *q, *n; |
3065 | struct pktgen_dev *cur; | 3061 | struct pktgen_dev *cur; |
3066 | 3062 | ||
3067 | PG_DEBUG(printk("pktgen: entering pktgen_rem_one_if\n")); | 3063 | pr_debug("pktgen: entering pktgen_rem_one_if\n"); |
3068 | 3064 | ||
3069 | if_lock(t); | 3065 | if_lock(t); |
3070 | 3066 | ||
@@ -3093,7 +3089,7 @@ static void pktgen_rem_all_ifs(struct pktgen_thread *t) | |||
3093 | 3089 | ||
3094 | /* Remove all devices, free mem */ | 3090 | /* Remove all devices, free mem */ |
3095 | 3091 | ||
3096 | PG_DEBUG(printk("pktgen: entering pktgen_rem_all_ifs\n")); | 3092 | pr_debug("pktgen: entering pktgen_rem_all_ifs\n"); |
3097 | if_lock(t); | 3093 | if_lock(t); |
3098 | 3094 | ||
3099 | list_for_each_safe(q, n, &t->if_list) { | 3095 | list_for_each_safe(q, n, &t->if_list) { |
@@ -3276,7 +3272,7 @@ static int pktgen_thread_worker(void *arg) | |||
3276 | 3272 | ||
3277 | t->pid = current->pid; | 3273 | t->pid = current->pid; |
3278 | 3274 | ||
3279 | PG_DEBUG(printk("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid)); | 3275 | pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid); |
3280 | 3276 | ||
3281 | max_before_softirq = t->max_before_softirq; | 3277 | max_before_softirq = t->max_before_softirq; |
3282 | 3278 | ||
@@ -3339,13 +3335,13 @@ static int pktgen_thread_worker(void *arg) | |||
3339 | set_current_state(TASK_INTERRUPTIBLE); | 3335 | set_current_state(TASK_INTERRUPTIBLE); |
3340 | } | 3336 | } |
3341 | 3337 | ||
3342 | PG_DEBUG(printk("pktgen: %s stopping all device\n", t->tsk->comm)); | 3338 | pr_debug("pktgen: %s stopping all device\n", t->tsk->comm); |
3343 | pktgen_stop(t); | 3339 | pktgen_stop(t); |
3344 | 3340 | ||
3345 | PG_DEBUG(printk("pktgen: %s removing all device\n", t->tsk->comm)); | 3341 | pr_debug("pktgen: %s removing all device\n", t->tsk->comm); |
3346 | pktgen_rem_all_ifs(t); | 3342 | pktgen_rem_all_ifs(t); |
3347 | 3343 | ||
3348 | PG_DEBUG(printk("pktgen: %s removing thread.\n", t->tsk->comm)); | 3344 | pr_debug("pktgen: %s removing thread.\n", t->tsk->comm); |
3349 | pktgen_rem_thread(t); | 3345 | pktgen_rem_thread(t); |
3350 | 3346 | ||
3351 | return 0; | 3347 | return 0; |
@@ -3364,7 +3360,7 @@ static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, | |||
3364 | } | 3360 | } |
3365 | 3361 | ||
3366 | if_unlock(t); | 3362 | if_unlock(t); |
3367 | PG_DEBUG(printk("pktgen: find_dev(%s) returning %p\n", ifname, pkt_dev)); | 3363 | pr_debug("pktgen: find_dev(%s) returning %p\n", ifname, pkt_dev); |
3368 | return pkt_dev; | 3364 | return pkt_dev; |
3369 | } | 3365 | } |
3370 | 3366 | ||
@@ -3533,7 +3529,7 @@ static int pktgen_remove_device(struct pktgen_thread *t, | |||
3533 | struct pktgen_dev *pkt_dev) | 3529 | struct pktgen_dev *pkt_dev) |
3534 | { | 3530 | { |
3535 | 3531 | ||
3536 | PG_DEBUG(printk("pktgen: remove_device pkt_dev=%p\n", pkt_dev)); | 3532 | pr_debug("pktgen: remove_device pkt_dev=%p\n", pkt_dev); |
3537 | 3533 | ||
3538 | if (pkt_dev->running) { | 3534 | if (pkt_dev->running) { |
3539 | printk("pktgen:WARNING: trying to remove a running interface, stopping it now.\n"); | 3535 | printk("pktgen:WARNING: trying to remove a running interface, stopping it now.\n"); |