All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Turull <daniel.turull@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, robert@herjulf.net, jens.laas@its.uu.se
Subject: Re: [PATCH 1/2] pktgen: increasing transmission granularity
Date: Thu, 10 Jun 2010 10:44:51 +0200	[thread overview]
Message-ID: <4C10A603.2080402@gmail.com> (raw)
In-Reply-To: <20100609.135040.193710199.davem@davemloft.net>

This patch correct a bug in the delay of pktgen. 
It makes sure the inter-packet interval is accurate.

Signed-off-by: Daniel Turull <daniel.turull@gmail.com>

---
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 2ad68da..1dacd7b 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2170,7 +2170,7 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
 	end_time = ktime_now();
 
 	pkt_dev->idle_acc += ktime_to_ns(ktime_sub(end_time, start_time));
-	pkt_dev->next_tx = ktime_add_ns(end_time, pkt_dev->delay);
+	pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay);
 }
 
 static inline void set_pkt_overhead(struct pktgen_dev *pkt_dev)

  reply	other threads:[~2010-06-10  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 11:49 [PATCH 1/2] pktgen: increasing transmission granularity Daniel Turull
2010-06-09 20:50 ` David Miller
2010-06-10  8:44   ` Daniel Turull [this message]
2010-06-10 15:44     ` robert
2010-06-11  6:08       ` David Miller
2010-06-10  8:49   ` Daniel Turull
2010-06-10 17:21     ` Robert Olsson
2010-06-12  1:40       ` 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=4C10A603.2080402@gmail.com \
    --to=daniel.turull@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jens.laas@its.uu.se \
    --cc=netdev@vger.kernel.org \
    --cc=robert@herjulf.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.