netdev
[Top] [All Lists]

Re: [6/6]: jenkins hash for neigh / Statistics

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [6/6]: jenkins hash for neigh / Statistics
From: Harald Welte <laforge@xxxxxxxxxxxx>
Date: Tue, 28 Sep 2004 00:26:13 +0200
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20040927121403.767e2308.davem@xxxxxxxxxxxxx>
References: <20040925005623.2faf8faf.davem@xxxxxxxxxxxxx> <E1CBu70-00010X-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040927121403.767e2308.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040818i
On Mon, Sep 27, 2004 at 12:14:03PM -0700, David S. Miller wrote:
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > David S. Miller <davem@xxxxxxxxxxxxx> wrote:
> > > 
> > > 4) The controversial/RFC patch, dorking with neigh_forced_gc()
> > >
> > > +                 if (n->nud_state -= NUD_INCOMPLETE &&
> > > +                     reap_incomplete == 0 &&
> > > +                     time_after(jiffies,
> > > +                                n->used + n->parms->retrans_time)) {
> > > +                         num_incomplete++;
> > > +                         goto next_ent;
> > 
> > That should either be time_before, or you need to swap the arguments.
> 
> Good catch, and it means that the code basically behaved
> as if the NUD_INCOMPLETE tests weren't even there.

which also explains why my statistics code actually never catched a
forced GC that didn't fulfill it's goal ;)

to get back at the statistics code:

As stated before, I would like to change rt_stat and ct_stat in order to
include a first 'template' line, too.  This way it is easier to write a
generic foo_stat program, that could deal with any of those statistics
files, even with new ones...  but this of course would break existing
rtstat binaries.  I personally  don't care, since it's a little-known
and little-used feature, which to my knowledge is in a lot of
distributions either non-existant [Debian] or incompatible [SuSE]. What
do you think?

-- 
- Harald Welte <laforge@xxxxxxxxxxxx>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>