From: Thomas Graf <tgraf@suug.ch>
To: Nicolas DICHTEL <nicolas.dichtel@6wind.com>
Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org
Subject: Re: Question about QOS
Date: Tue, 26 Apr 2005 21:14:54 +0200 [thread overview]
Message-ID: <20050426191454.GU577@postel.suug.ch> (raw)
In-Reply-To: <426E56DC.7000108@6wind.com>
* Nicolas DICHTEL <426E56DC.7000108@6wind.com> 2005-04-26 16:57
> You can have the same kind of problem with a ingress filter. I propose the
> following patch to fix the range to 0..bound
>
> [SCHED] Fix range in psched_tod_diff() to 0..bound
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>
> diff -Nru linux-2.6-a/include/net/pkt_sched.h linux-2.6-b/include/net/pkt_sched.h
> --- linux-2.6-a/include/net/pkt_sched.h 2005-04-26 15:45:07.074124664 +0200
> +++ linux-2.6-b/include/net/pkt_sched.h 2005-04-26 15:47:26.215971888 +0200
> @@ -140,7 +140,7 @@
> if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
> return bound;
> delta = delta_sec * 1000000;
> - if (delta > bound)
> + if (delta > bound || delta < 0)
> delta = bound;
> return delta;
> }
Yes I agree, it doesn't really matter what value we return and `bound'
is most likely to be correct. I think we should also fix the unlikely
but still possible case when tv1.tv_usec is slightly smaller than
tv2.tv_usec. I know it is very unlikely but do_gettimeofday really
is not that reliable and we have users which rely on a positive
delta. Can you extend your patch to return abs(delta) for case 0
in PSCHED_TDIFF_SAFE?
next prev parent reply other threads:[~2005-04-26 19:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 9:16 Question about QOS Nicolas DICHTEL
2005-04-26 12:59 ` Thomas Graf
2005-04-26 14:57 ` Nicolas DICHTEL
2005-04-26 19:14 ` Thomas Graf [this message]
2005-04-27 7:44 ` Nicolas DICHTEL
2005-04-27 11:42 ` Thomas Graf
2005-04-28 19:14 ` David S. Miller
2005-04-29 12:16 ` Patrick McHardy
2005-04-29 12:39 ` Thomas Graf
2005-05-03 21:40 ` David S. 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=20050426191454.GU577@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=linux-net@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=nicolas.dichtel@6wind.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).