From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] pktgen: restore nanosec delays
Date: Sun, 04 Oct 2009 08:45:12 +0200 [thread overview]
Message-ID: <4AC84478.3010102@gmail.com> (raw)
In-Reply-To: <20091003211620.4ac469b6@nehalam>
Stephen Hemminger a écrit :
> On Sat, 03 Oct 2009 13:39:18 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>> Commit fd29cf72 (pktgen: convert to use ktime_t)
>> inadvertantly converted "delay" parameter from nanosec to microsec.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> ---
>>
>> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
>> index b694552..227ba31 100644
>> --- a/net/core/pktgen.c
>> +++ b/net/core/pktgen.c
>> @@ -964,7 +964,7 @@ static ssize_t pktgen_if_write(struct file *file,
>> if (value == 0x7FFFFFFF)
>> pkt_dev->delay = ULLONG_MAX;
>> else
>> - pkt_dev->delay = (u64)value * NSEC_PER_USEC;
>> + pkt_dev->delay = (u64)value;
>
> Is the cast really necessary?
It reminds us 'value' is 32 bits, but it's not necessary, as C compiler
can silently do the cast.
next prev parent reply other threads:[~2009-10-04 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-03 11:39 [PATCH] pktgen: restore nanosec delays Eric Dumazet
2009-10-04 4:16 ` Stephen Hemminger
2009-10-04 6:45 ` Eric Dumazet [this message]
2009-10-05 4:09 ` 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=4AC84478.3010102@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).