netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varun Chandramohan <varunc@linux.vnet.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, kaber@trash.net, socketcan@hartkopp.net,
	shemminger@linux-foundation.org, krkumar2@in.ibm.com,
	tgraf@suug.ch, varuncha@in.ibm.com
Subject: [PATCH 0/3 Rev-4] Age Entry For IPv4 & IPv6 Route Table
Date: Thu, 20 Sep 2007 20:56:35 +0530	[thread overview]
Message-ID: <20070920205635.4c9879f7.varunc@linux.vnet.ibm.com> (raw)

Hi Dave,
	Thanks for the comment. I have created another patch set as you have suggested.
Your Comments:
In avoiding the age initialization at routing cache insertion time,
you make the value provided totally inaccurate and essentially
useless especially the very first time the value is asked for.

I really don't like these changes, they have had problems every step
of the way, and the above proves that we could essentially always
return an age value of zero and still be compliant with the standards.

+	if (!*age) {
> +		*age = timeval_to_sec(&tv);
> +		NLA_PUT_U32(skb, RTA_AGE, *age);
I have made a mistake. Sorry i didnt catch it earlier :-)
So, NLA_PUT_U32(skb, RTA_AGE, 0) would have made more sense?
> +	} else {
> +		NLA_PUT_U32(skb, RTA_AGE, timeval_to_sec(&tv) - *age);
> +	}

Since you didnt like the hack, i have reimplemented the above by initilizing the age value at the time of insertion. I hope this is what you pointed out in your comments. Please let me know if its ok.

Stephen, as the age value is human readable we decided that it need not be accurate. I thought that rounding up will make it a bit more readable. But i think you are right. So, in this patchset i have taken care of this issue. Is this ok? 

Regards,
Varun

Original Comment:
According to the RFC 4292 (IP Forwarding Table MIB) there is a need for an age entry for all the routes in therouting table. The entry in the RFC is inetCidrRouteAge and oid is inetCidrRouteAge.1.10.
Many snmp application require this age entry. So iam adding the age field in the routing table for ipv4 and ipv6 and providing the interface for this value netlink.

I made a note of changes i made as per the suggestions given in the community. Here is the changelog.

Changelog since ver 1:
---------------------
        Changes							Suggestion	
 
1)Change in the interface from proc to netlink.
  It was not approved by David Miller and Yoshifuji.            David Miller & Yoshifuji

2)Change from jiffies to timeval.				Eric Dumazet

3)Rounding up timeval						Patrick McHardy, Oliver Hartkopp
								Eric Dumazet.

4)Relocate timeval_to_sec					Stephen Hemminger, Krishna Kumar

5)Using macro RT6_GET_ROUTE_INFO				Krishna Kumar

6)Add proper comment for timeval_to_sec				Eric Dumazet

7)Add proper comment for timeval insertion			Thomas Graf				  

8)Insert the age value at route insertion			David Miller

9)Remove round off.						Stephen Hemminger
Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
---


                 reply	other threads:[~2007-09-20 15:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070920205635.4c9879f7.varunc@linux.vnet.ibm.com \
    --to=varunc@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    --cc=socketcan@hartkopp.net \
    --cc=tgraf@suug.ch \
    --cc=varuncha@in.ibm.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).