From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Rick Jones <rick.jones2@hp.com>
Cc: David Miller <davem@davemloft.net>,
Rick Jones <rick.jones2@hp.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] [RFC] allow admin/users to specify rto_min in milliseconds rather than jiffies
Date: Thu, 13 Sep 2007 10:39:57 +0200 [thread overview]
Message-ID: <20070913103957.5354ea5d@oldman> (raw)
In-Reply-To: <46E84BFA.2070101@hp.com>
On Wed, 12 Sep 2007 13:28:42 -0700
Rick Jones <rick.jones2@hp.com> wrote:
> >> The api in netlink should be in milliseconds rather than compensating
> >> in the application (iproute2).
> >
> >
> > My understanding of the in-kernel rtnetlink code is far from complete,
> > but it doesn't seem to have much in the way of provisions for unit
> > conversion, which would suggest no nice suffix-based ui as in tc, and ip
> > is already doing some massaging of units on the display side for a
> > couple of the other parameters, so I'm at something of a loss.
>
> So, I used the source and looked and saw that tc seems to convert
> everything to nanoseconds and passes that to the kernel. The user can
> give it seconds, milliseconds, microseconds or nanoseconds by using a
> suffix. It then does something ostensibly intelligent to display those
> to the user.
>
> Ip converts nothing when passing things to the kernel (rtt rttvar or rto
> - when/if at least the intial rto changes are included - were they?),
> but when they come-out of the kernel ip converts them to milliseconds.
> So the units in != the units out.
>
> Tc seems much more friendly and less prone to user error.
>
> I'm still not sure how "easily" rtnetlink can do conversions itself -
> feedback there would be _very_ welcome - but at the very least, having
> ip provide at least the illusion of what tc does would seem to be a good
> thing.
>
> rick jones
Your observations are correct. rtnetlink can't/shouldn't be doing conversions
itself. The 'ip' command should use a consistent unit for all values and
do conversions if necessary.
next prev parent reply other threads:[~2007-09-13 8:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-04 20:20 [PATCH] [RFC] allow admin/users to specify rto_min in milliseconds rather than jiffies Rick Jones
2007-09-05 6:38 ` Stephen Hemminger
2007-09-05 17:11 ` Rick Jones
2007-09-06 21:17 ` Rick Jones
2007-09-12 20:28 ` Rick Jones
2007-09-13 8:39 ` Stephen Hemminger [this message]
2007-09-13 16:56 ` Rick Jones
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=20070913103957.5354ea5d@oldman \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.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).