[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>
This commit is contained in:
parent
2845b63b50
commit
b4099fab75
|
@ -75,7 +75,7 @@
|
||||||
* By design there should only be *one* "controlling" process. In practice
|
* By design there should only be *one* "controlling" process. In practice
|
||||||
* multiple write accesses gives unpredictable result. Understood by "write"
|
* multiple write accesses gives unpredictable result. Understood by "write"
|
||||||
* to /proc gives result code thats should be read be the "writer".
|
* to /proc gives result code thats should be read be the "writer".
|
||||||
* For pratical use this should be no problem.
|
* For practical use this should be no problem.
|
||||||
*
|
*
|
||||||
* Note when adding devices to a specific CPU there good idea to also assign
|
* Note when adding devices to a specific CPU there good idea to also assign
|
||||||
* /proc/irq/XX/smp_affinity so TX-interrupts gets bound to the same CPU.
|
* /proc/irq/XX/smp_affinity so TX-interrupts gets bound to the same CPU.
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
* New xmit() return, do_div and misc clean up by Stephen Hemminger
|
* New xmit() return, do_div and misc clean up by Stephen Hemminger
|
||||||
* <shemminger@osdl.org> 040923
|
* <shemminger@osdl.org> 040923
|
||||||
*
|
*
|
||||||
* Rany Dunlap fixed u64 printk compiler waring
|
* Randy Dunlap fixed u64 printk compiler waring
|
||||||
*
|
*
|
||||||
* Remove FCS from BW calculation. Lennert Buytenhek <buytenh@wantstofly.org>
|
* Remove FCS from BW calculation. Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
* New time handling. Lennert Buytenhek <buytenh@wantstofly.org> 041213
|
* New time handling. Lennert Buytenhek <buytenh@wantstofly.org> 041213
|
||||||
|
@ -244,7 +244,7 @@ struct pktgen_dev {
|
||||||
__u32 seq_num;
|
__u32 seq_num;
|
||||||
|
|
||||||
int clone_skb; /* Use multiple SKBs during packet gen. If this number
|
int clone_skb; /* Use multiple SKBs during packet gen. If this number
|
||||||
* is greater than 1, then that many coppies of the same
|
* is greater than 1, then that many copies of the same
|
||||||
* packet will be sent before a new packet is allocated.
|
* packet will be sent before a new packet is allocated.
|
||||||
* For instance, if you want to send 1024 identical packets
|
* For instance, if you want to send 1024 identical packets
|
||||||
* before creating a new packet, set clone_skb to 1024.
|
* before creating a new packet, set clone_skb to 1024.
|
||||||
|
@ -396,7 +396,7 @@ static inline s64 divremdi3(s64 x, s64 y, int type)
|
||||||
|
|
||||||
/* End of hacks to deal with 64-bit math on x86 */
|
/* End of hacks to deal with 64-bit math on x86 */
|
||||||
|
|
||||||
/** Convert to miliseconds */
|
/** Convert to milliseconds */
|
||||||
static inline __u64 tv_to_ms(const struct timeval* tv)
|
static inline __u64 tv_to_ms(const struct timeval* tv)
|
||||||
{
|
{
|
||||||
__u64 ms = tv->tv_usec / 1000;
|
__u64 ms = tv->tv_usec / 1000;
|
||||||
|
@ -425,7 +425,7 @@ static inline __u64 pg_div64(__u64 n, __u64 base)
|
||||||
{
|
{
|
||||||
__u64 tmp = n;
|
__u64 tmp = n;
|
||||||
/*
|
/*
|
||||||
* How do we know if the architectrure we are running on
|
* How do we know if the architecture we are running on
|
||||||
* supports division with 64 bit base?
|
* supports division with 64 bit base?
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -544,12 +544,12 @@ static ssize_t proc_pgctrl_read(struct file* file, char __user * buf,
|
||||||
len = strlen(data);
|
len = strlen(data);
|
||||||
|
|
||||||
if(len > count) {
|
if(len > count) {
|
||||||
len =-EFAULT;
|
len = -EFAULT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy_to_user(buf, data, len)) {
|
if (copy_to_user(buf, data, len)) {
|
||||||
len =-EFAULT;
|
len = -EFAULT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ static ssize_t proc_pgctrl_write(struct file* file,const char __user * buf,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (copy_from_user(data, buf, count)) {
|
if (copy_from_user(data, buf, count)) {
|
||||||
err =-EFAULT;
|
err = -EFAULT;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
data[count-1] = 0; /* Make string */
|
data[count-1] = 0; /* Make string */
|
||||||
|
@ -1702,7 +1702,7 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
|
||||||
start = now = getCurUs();
|
start = now = getCurUs();
|
||||||
printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
|
printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
|
||||||
while (now < spin_until_us) {
|
while (now < spin_until_us) {
|
||||||
/* TODO: optimise sleeping behavior */
|
/* TODO: optimize sleeping behavior */
|
||||||
if (spin_until_us - now > jiffies_to_usecs(1)+1)
|
if (spin_until_us - now > jiffies_to_usecs(1)+1)
|
||||||
schedule_timeout_interruptible(1);
|
schedule_timeout_interruptible(1);
|
||||||
else if (spin_until_us - now > 100) {
|
else if (spin_until_us - now > 100) {
|
||||||
|
|
Loading…
Reference in New Issue