| To: | Shirley Ma <mashirle@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] New Patch: Implementation for IPv6 MIB:ipv6AddressTable |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Fri, 10 Oct 2003 00:04:13 -0700 |
| Cc: | kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx |
| In-reply-to: | <200310091317.35164.mashirle@us.ibm.com> |
| References: | <OF4B7AD7E2.5CA239A1-ON87256DB9.0067C527@us.ibm.com> <20031008130016.559b8047.davem@redhat.com> <200310081706.09485.mashirle@us.ibm.com> <200310091317.35164.mashirle@us.ibm.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 9 Oct 2003 13:17:35 -0700 Shirley Ma <mashirle@xxxxxxxxxx> 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. |
| Previous by Date: | Re: [PATCH] cosa -- incorrect comparison for register_netdev, David S. Miller |
|---|---|
| Next by Date: | Re: 2.6.0-test7-netx1, David S. Miller |
| Previous by Thread: | Re: [PATCH] New Patch: Implementation for IPv6 MIB:ipv6AddressTable, Shirley Ma |
| Next by Thread: | Re: [PATCH] New Patch: Implementation for IPv6 MIB:ipv6AddressTable, Shirley Ma |
| Indexes: | [Date] [Thread] [Top] [All Lists] |