aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-10-14 18:32:22 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-10-25 22:08:10 -0400
commitb4099fab75d5e3eae8d207c0d7159e2f3348686e (patch)
tree62e1e42f5422c14491a5b7bd90d48da057912b17 /net/core
parent2845b63b504b051a9cb4d78bed8b3594451a1f6f (diff)
[PKTGEN]: Spelling and white space
Fix some cosmetic issues. Indentation, spelling errors, and some whitespace. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/pktgen.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index b597ef1771f4..ad053c8cb7fc 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -75,7 +75,7 @@
75 * By design there should only be *one* "controlling" process. In practice 75 * By design there should only be *one* "controlling" process. In practice
76 * multiple write accesses gives unpredictable result. Understood by "write" 76 * multiple write accesses gives unpredictable result. Understood by "write"
77 * to /proc gives result code thats should be read be the "writer". 77 * to /proc gives result code thats should be read be the "writer".
78 * For pratical use this should be no problem. 78 * For practical use this should be no problem.
79 * 79 *
80 * Note when adding devices to a specific CPU there good idea to also assign 80 * Note when adding devices to a specific CPU there good idea to also assign
81 * /proc/irq/XX/smp_affinity so TX-interrupts gets bound to the same CPU. 81 * /proc/irq/XX/smp_affinity so TX-interrupts gets bound to the same CPU.
@@ -96,7 +96,7 @@
96 * New xmit() return, do_div and misc clean up by Stephen Hemminger 96 * New xmit() return, do_div and misc clean up by Stephen Hemminger
97 * <shemminger@osdl.org> 040923 97 * <shemminger@osdl.org> 040923
98 * 98 *
99 * Rany Dunlap fixed u64 printk compiler waring 99 * Randy Dunlap fixed u64 printk compiler waring
100 * 100 *
101 * Remove FCS from BW calculation. Lennert Buytenhek <buytenh@wantstofly.org> 101 * Remove FCS from BW calculation. Lennert Buytenhek <buytenh@wantstofly.org>
102 * New time handling. Lennert Buytenhek <buytenh@wantstofly.org> 041213 102 * New time handling. Lennert Buytenhek <buytenh@wantstofly.org> 041213
@@ -244,7 +244,7 @@ struct pktgen_dev {
244 __u32 seq_num; 244 __u32 seq_num;
245 245
246 int clone_skb; /* Use multiple SKBs during packet gen. If this number 246 int clone_skb; /* Use multiple SKBs during packet gen. If this number
247 * is greater than 1, then that many coppies of the same 247 * is greater than 1, then that many copies of the same
248 * packet will be sent before a new packet is allocated. 248 * packet will be sent before a new packet is allocated.
249 * For instance, if you want to send 1024 identical packets 249 * For instance, if you want to send 1024 identical packets
250 * before creating a new packet, set clone_skb to 1024. 250 * before creating a new packet, set clone_skb to 1024.
@@ -396,7 +396,7 @@ static inline s64 divremdi3(s64 x, s64 y, int type)
396 396
397/* End of hacks to deal with 64-bit math on x86 */ 397/* End of hacks to deal with 64-bit math on x86 */
398 398
399/** Convert to miliseconds */ 399/** Convert to milliseconds */
400static inline __u64 tv_to_ms(const struct timeval* tv) 400static inline __u64 tv_to_ms(const struct timeval* tv)
401{ 401{
402 __u64 ms = tv->tv_usec / 1000; 402 __u64 ms = tv->tv_usec / 1000;
@@ -425,7 +425,7 @@ static inline __u64 pg_div64(__u64 n, __u64 base)
425{ 425{
426 __u64 tmp = n; 426 __u64 tmp = n;
427/* 427/*
428 * How do we know if the architectrure we are running on 428 * How do we know if the architecture we are running on
429 * supports division with 64 bit base? 429 * supports division with 64 bit base?
430 * 430 *
431 */ 431 */
@@ -544,12 +544,12 @@ static ssize_t proc_pgctrl_read(struct file* file, char __user * buf,
544 len = strlen(data); 544 len = strlen(data);
545 545
546 if(len > count) { 546 if(len > count) {
547 len =-EFAULT; 547 len = -EFAULT;
548 goto out; 548 goto out;
549 } 549 }
550 550
551 if (copy_to_user(buf, data, len)) { 551 if (copy_to_user(buf, data, len)) {
552 len =-EFAULT; 552 len = -EFAULT;
553 goto out; 553 goto out;
554 } 554 }
555 555
@@ -578,7 +578,7 @@ static ssize_t proc_pgctrl_write(struct file* file,const char __user * buf,
578 goto out; 578 goto out;
579 } 579 }
580 if (copy_from_user(data, buf, count)) { 580 if (copy_from_user(data, buf, count)) {
581 err =-EFAULT; 581 err = -EFAULT;
582 goto out_free; 582 goto out_free;
583 } 583 }
584 data[count-1] = 0; /* Make string */ 584 data[count-1] = 0; /* Make string */
@@ -1702,7 +1702,7 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
1702 start = now = getCurUs(); 1702 start = now = getCurUs();
1703 printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now)); 1703 printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
1704 while (now < spin_until_us) { 1704 while (now < spin_until_us) {
1705 /* TODO: optimise sleeping behavior */ 1705 /* TODO: optimize sleeping behavior */
1706 if (spin_until_us - now > jiffies_to_usecs(1)+1) 1706 if (spin_until_us - now > jiffies_to_usecs(1)+1)
1707 schedule_timeout_interruptible(1); 1707 schedule_timeout_interruptible(1);
1708 else if (spin_until_us - now > 100) { 1708 else if (spin_until_us - now > 100) {
@@ -2361,7 +2361,7 @@ static void pktgen_stop_all_threads_ifs(void)
2361 pktgen_stop(t); 2361 pktgen_stop(t);
2362 t = t->next; 2362 t = t->next;
2363 } 2363 }
2364 thread_unlock(); 2364 thread_unlock();
2365} 2365}
2366 2366
2367static int thread_is_running(struct pktgen_thread *t ) 2367static int thread_is_running(struct pktgen_thread *t )
@@ -2555,7 +2555,7 @@ static void pktgen_rem_thread(struct pktgen_thread *t)
2555 if (strlen(t->fname)) 2555 if (strlen(t->fname))
2556 remove_proc_entry(t->fname, NULL); 2556 remove_proc_entry(t->fname, NULL);
2557 2557
2558 thread_lock(); 2558 thread_lock();
2559 2559
2560 if (tmp == t) 2560 if (tmp == t)
2561 pktgen_threads = tmp->next; 2561 pktgen_threads = tmp->next;
@@ -2929,7 +2929,7 @@ static struct pktgen_thread *pktgen_find_thread(const char* name)
2929{ 2929{
2930 struct pktgen_thread *t = NULL; 2930 struct pktgen_thread *t = NULL;
2931 2931
2932 thread_lock(); 2932 thread_lock();
2933 2933
2934 t = pktgen_threads; 2934 t = pktgen_threads;
2935 while (t) { 2935 while (t) {