netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: varunc@linux.vnet.ibm.com
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: Re: [PATCH 2/3 Rev4] Initilize and populate age field
Date: Sun, 30 Sep 2007 17:41:54 -0700 (PDT)	[thread overview]
Message-ID: <20070930.174154.39184307.davem@davemloft.net> (raw)
In-Reply-To: <20070920205751.dfaa34d8.varunc@linux.vnet.ibm.com>

From: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Date: Thu, 20 Sep 2007 20:57:51 +0530

> @@ -420,6 +421,7 @@ static int fn_hash_insert(struct fib_tab
>  	else
>  		fa = fib_find_alias(&f->fn_alias, tos, fi->fib_priority);
>  
> +	do_gettimeofday(&tv);
>  	/* Now fa, if non-NULL, points to the first fib alias
>  	 * with the same keys [prefix,tos,priority], if such key already
>  	 * exists or to the node before which we will insert new one.

gettimeofday() is expensive, we don't even use it to timestamp every
incoming packet and we therefore should not do it every route cache
entry we create in order to handle DoS situations efficiently

I honestly don't like these patches.  I literally cringe every time
you post a new revision.  It's either going to add new costs to route
management or be so inaccurate as to be useless.

I question it's usefulness even if implemented efficiently and
accurately.  I really don't see people lining up asking for a route
aging metric.

We could report zero and be compliant with the RFC, we don't age our
route entries like the model of the SNMP vars seems to suggest, so
it's honestly accurate.  And this would mean no kernel changes, as the
userland program could just report zero in the absense of a kernel
provided value.

      reply	other threads:[~2007-10-01  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-20 15:27 [PATCH 2/3 Rev4] Initilize and populate age field Varun Chandramohan
2007-10-01  0:41 ` David Miller [this message]

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=20070930.174154.39184307.davem@davemloft.net \
    --to=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=varunc@linux.vnet.ibm.com \
    --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).