netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: Nicolas DICHTEL <nicolas.dichtel@6wind.com>,
	netdev@oss.sgi.com, linux-net@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: Question about QOS
Date: Fri, 29 Apr 2005 14:16:50 +0200	[thread overview]
Message-ID: <427225B2.6010705@trash.net> (raw)
In-Reply-To: <20050427114216.GV577@postel.suug.ch>

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

Thomas Graf wrote:
> * Nicolas DICHTEL <426F42F0.9020609@6wind.com> 2005-04-27 09:44
> 
>>>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?

Why abs(delta)? It could be above bound, in fact all cases besides
delta_sec > 2 doesn't take care to stay inside [0..bound] at all.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 940 bytes --]

[PKT_SCHED]: Fix range in PSCHED_TDIFF_SAFE to 0..bound

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit d5f65671be760f33c1c7667f793ed75ad6e6a710
tree 4af3018396f125b0c2601882d924e63a0d74bef4
parent 980207c270e72e2cc6ae7b0de6ea6cd38a726e5b
author Patrick McHardy <kaber@trash.net> 1114776755 +0200
committer Patrick McHardy <kaber@trash.net> 1114776755 +0200

Index: include/net/pkt_sched.h
===================================================================
--- e38e7620d369bfa898a2e3f6aaf2f04c8826f38e/include/net/pkt_sched.h  (mode:100644 sha1:7352e455053cc857e70f0cb1e008eb7adabbe011)
+++ 4af3018396f125b0c2601882d924e63a0d74bef4/include/net/pkt_sched.h  (mode:100644 sha1:fcb05a387dbee560d6a0f20b6e8c3c4f1b2d93f1)
@@ -157,7 +157,8 @@
 	   case 1: \
 		   __delta += 1000000; \
 	   case 0: \
-		   __delta = abs(__delta); \
+ 		   if (__delta > bound || __delta < 0) \
+ 			__delta = bound; \
 	   } \
 	   __delta; \
 })

  parent reply	other threads:[~2005-04-29 12:16 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
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 [this message]
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=427225B2.6010705@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=nicolas.dichtel@6wind.com \
    --cc=tgraf@suug.ch \
    /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).