From: Nicolas DICHTEL <nicolas.dichtel@6wind.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org
Subject: Re: Question about QOS
Date: Wed, 27 Apr 2005 09:44:48 +0200 [thread overview]
Message-ID: <426F42F0.9020609@6wind.com> (raw)
In-Reply-To: <20050426191454.GU577@postel.suug.ch>
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
>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?
>-
>To unsubscribe from this list: send the line "unsubscribe linux-net" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
You're right. Here is the new patch.
[SCHED] Fix range in PSCHED_TDIFF_SAFE to 0..bound
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
[-- Attachment #2: x.diff --]
[-- Type: text/plain, Size: 640 bytes --]
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.000000000 +0200
+++ linux-2.6-b/include/net/pkt_sched.h 2005-04-27 09:36:23.421634576 +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;
}
@@ -156,7 +156,8 @@
__delta += 1000000; \
case 1: \
__delta += 1000000; \
- case 0: ; \
+ case 0: \
+ __delta = abs(__delta); \
} \
__delta; \
})
next prev parent reply other threads:[~2005-04-27 7:44 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 [this message]
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=426F42F0.9020609@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=linux-net@vger.kernel.org \
--cc=netdev@oss.sgi.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).