netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Shirley Ma <mashirle@us.ibm.com>
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH] New Patch: Implementation for IPv6 MIB:ipv6AddressTable
Date: Fri, 10 Oct 2003 00:04:13 -0700	[thread overview]
Message-ID: <20031010000413.7935be3c.davem@redhat.com> (raw)
In-Reply-To: <200310091317.35164.mashirle@us.ibm.com>

On Thu, 9 Oct 2003 13:17:35 -0700
Shirley Ma <mashirle@us.ibm.com> wrote:

> Which one do you think is better.
> 
> This one is too much math.
> 
> ci.cstamp = (__u32)(TIME_DELTA(ifa->cstamp, INITIAL_JIFFIES) / HZ * 100
> 		  + TIME_DELTA(ifa->cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
> ci.tstamp = (__u32)(TIME_DELTA(ifa->tstamp, INITIAL_JIFFIES) / HZ * 100
> 		  + TIME_DELTA(ifa->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);

Why are you using jiffies for timestamps?  I guess these values
are measured "since bootup" or something like that?

Anyways, I prefer the "too much math" because 1) it isn't a lot of
math, most of these things are constants which make the expressions
easy to compute 2) it's only done when someone asks for the information.

  reply	other threads:[~2003-10-10  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 18:55 [PATCH] Implementation for IPv6 MIB:ipv6AddressTable Shirley Ma
2003-10-08 20:00 ` David S. Miller
2003-10-09  0:06   ` [PATCH] New Patch: " Shirley Ma
2003-10-09 20:17     ` Shirley Ma
2003-10-10  7:04       ` David S. Miller [this message]
2003-10-14 17:38     ` Shirley Ma
2003-10-14 22:25       ` David S. Miller
2003-10-16  5:37       ` David S. Miller
2003-10-16 16:56         ` Shirley Ma
2003-10-16 23:29           ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10 21:42 Shirley Ma

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=20031010000413.7935be3c.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=mashirle@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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).