From: Daniel Turull <daniel.turull@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Robert Olsson <robert@herjulf.net>,
Voravit Tanyingyong <voravit@kth.se>,
Jens Laas <jens.laas@uadm.uu.se>
Subject: [patch] pktgen: bug when calling ndelay in x86 architectures
Date: Tue, 18 Oct 2011 13:08:11 +0200 [thread overview]
Message-ID: <4E9D5E1B.3080704@gmail.com> (raw)
The value selected to delay the transmission in pktgen with the ndelay function should be lower.
In Linux/arch/x86/include/asm/delay.h and Linux/arch/sh/include/asm/delay.h
the maximal expected value for a constant is 20000 ns.
Signed-off-by: Daniel Turull <daniel.turull@gmail.com>
---
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 796044a..e17bd41 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2145,7 +2145,7 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
}
start_time = ktime_now();
- if (remaining < 100000)
+ if (remaining < 20000)
ndelay(remaining); /* really small just spin */
else {
/* see do_nanosleep */
next reply other threads:[~2011-10-18 11:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 11:08 Daniel Turull [this message]
2011-10-18 11:56 ` [patch] pktgen: bug when calling ndelay in x86 architectures Eric Dumazet
2011-10-18 14:00 ` Ben Hutchings
2011-10-18 14:47 ` Eric Dumazet
[not found] ` <4E9E9963.7090209@gmail.com>
2011-10-19 10:13 ` Eric Dumazet
2011-10-20 13:22 ` Daniel Turull
2011-10-20 13:44 ` Eric Dumazet
2011-10-20 14:26 ` Daniel Turull
2011-10-20 20:24 ` David Miller
2011-10-20 20:55 ` Eric Dumazet
2011-10-20 21:02 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E9D5E1B.3080704@gmail.com \
--to=daniel.turull@gmail.com \
--cc=davem@davemloft.net \
--cc=jens.laas@uadm.uu.se \
--cc=netdev@vger.kernel.org \
--cc=robert@herjulf.net \
--cc=voravit@kth.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).