From: Dave Taht <dave.taht@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Yousuk Seung <ysseung@google.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Michael McLennan <nefario@google.com>,
Priyaranjan Jha <priyarjha@google.com>,
Neal Cardwell <ncardwell@google.com>
Subject: Re: [PATCH v2 iproute2-next 1/3] tc: support conversions to or from 64 bit nanosecond-based time
Date: Wed, 3 Oct 2018 09:09:21 -0700 [thread overview]
Message-ID: <CAA93jw6SSZY_txKMrii3FypWKcCtd3LoUniGAVpkoQmwkyht0Q@mail.gmail.com> (raw)
In-Reply-To: <CAA93jw5iUqvF8Qj5JwKJEX=41cZA26oo9BTc0Gp8SYNAn0zU6A@mail.gmail.com>
On Mon, Aug 27, 2018 at 9:39 AM Dave Taht <dave.taht@gmail.com> wrote:
>
> On Mon, Aug 27, 2018 at 9:11 AM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > On Sun, 26 Aug 2018 19:42:28 -0700
> > Yousuk Seung <ysseung@google.com> wrote:
> >
> > > +int get_time(unsigned int *time, const char *str)
> > > +{
> > > + double t;
> > > + char *p;
> > > +
> > > + t = strtod(str, &p);
> > > + if (p == str)
> > > + return -1;
> > > +
> > > + if (*p) {
> > > + if (strcasecmp(p, "s") == 0 || strcasecmp(p, "sec") == 0 ||
> > > + strcasecmp(p, "secs") == 0)
> > > + t *= TIME_UNITS_PER_SEC;
> > > + else if (strcasecmp(p, "ms") == 0 || strcasecmp(p, "msec") == 0 ||
> > > + strcasecmp(p, "msecs") == 0)
> > > + t *= TIME_UNITS_PER_SEC/1000;
> > > + else if (strcasecmp(p, "us") == 0 || strcasecmp(p, "usec") == 0 ||
> > > + strcasecmp(p, "usecs") == 0)
> > > + t *= TIME_UNITS_PER_SEC/1000000;
> > > + else
> > > + return -1;
> >
> > Do we need to really support UPPER case.
>
> But that's ALWAYS been the case in the 32 bit version of code above.
> Imagine how many former VMS and MVS hackers you'd upset if they had to
> turn caps-lock off!
I was trying to be funny, of course. If you want us to rework the
patch to also downgrade to
being lowercase for both, ok... I'd rather like to finish getting this
upstream, there's
a change to netem enabling nsec time long stuck behind it.
>
> > Isn't existing matches semantics good enough?
>
> But that's the existing case for the 32 bit api, now replicated in the
> 64 bit api. ? I think the case-insensitive ship has sailed here. Can't
> break userspace.
>
> Well.. adding UTF-8 would be cool. We could start using the actual
> greek symbols for delta (δ) and beta (β) in particular. It would
> replace a lot of typing, with a whole bunch more shift keys on a
> single letter, fit better into
> 80 column lines, and so on, and tc inputs and outputs are already
> pretty greek to many.
> --
>
> Dave Täht
> CEO, TekLibre, LLC
> http://www.teklibre.com
> Tel: 1-669-226-2619
--
Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
next prev parent reply other threads:[~2018-10-03 22:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 2:42 [PATCH v2 iproute2-next 0/3] support delivering packets in Yousuk Seung
2018-08-27 2:42 ` [PATCH v2 iproute2-next 1/3] tc: support conversions to or from 64 bit nanosecond-based time Yousuk Seung
2018-08-27 16:11 ` Stephen Hemminger
2018-08-27 16:39 ` Dave Taht
2018-10-03 16:09 ` Dave Taht [this message]
2018-08-27 2:42 ` [PATCH v2 iproute2-next 2/3] q_netem: support delivering packets in delayed time slots Yousuk Seung
2018-08-27 2:42 ` [PATCH v2 iproute2-next 3/3] q_netem: slotting with non-uniform distribution Yousuk Seung
2018-08-30 18:10 ` [PATCH v2 iproute2-next 0/3] support delivering packets in David Ahern
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=CAA93jw6SSZY_txKMrii3FypWKcCtd3LoUniGAVpkoQmwkyht0Q@mail.gmail.com \
--to=dave.taht@gmail.com \
--cc=dsahern@gmail.com \
--cc=ncardwell@google.com \
--cc=nefario@google.com \
--cc=netdev@vger.kernel.org \
--cc=priyarjha@google.com \
--cc=stephen@networkplumber.org \
--cc=ysseung@google.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).