From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 1/2] pktgen: increasing transmission granularity Date: Wed, 09 Jun 2010 13:50:40 -0700 (PDT) Message-ID: <20100609.135040.193710199.davem@davemloft.net> References: <4C064533.6070709@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, robert@herjulf.net, jens.laas@its.uu.se To: daniel.turull@gmail.com Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:42825 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753242Ab0FIUub (ORCPT ); Wed, 9 Jun 2010 16:50:31 -0400 In-Reply-To: <4C064533.6070709@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Daniel Turull Date: Wed, 02 Jun 2010 13:49:07 +0200 > This patch increases the granularity of the rate generated by pktgen. > The previous version of pktgen uses micro seconds (udelay) resolution when it > was delayed causing gaps in the rates. It is changed to nanosecond (ndelay). > Now any rate is possible. > > Also it allows to set, the desired rate in Mb/s or packets per second. > > The documentation has been updated. > > Signed-off-by: Daniel Turull I like this, however although most of this is adding a new feature, this part: > @@ -2170,7 +2204,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) Is a bug fix, since it makes sure the inter-packet interval is accurate. Can you please submit this part seperately, so I can apply it to net-2.6 Then you can submit the nanosecond feature parts relative to this, which I'll apply to net-next-2.6 Thanks!