[Top] [All Lists]

Re: [PATCH 2.6] generic network statistics (was Re: [6/6]: jenkins hash

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: [PATCH 2.6] generic network statistics (was Re: [6/6]: jenkins hash for neigh / Statistics)
From: jamal <hadi@xxxxxxxxxx>
Date: 28 Sep 2004 22:22:07 -0400
Cc: Harald Welte <laforge@xxxxxxxxxxxx>, Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, Stephen Hemminger <shemminger@xxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, herbert@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040928133334.GW31616@xxxxxxxxxxxxxx>
Organization: jamalopolous
References: <20040925005623.2faf8faf.davem@xxxxxxxxxxxxx> <E1CBu70-00010X-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040927121403.767e2308.davem@xxxxxxxxxxxxx> <20040927222613.GE3236@xxxxxxxxxxxxxxxxxxxxxxx> <20040927160636.7741d973.davem@xxxxxxxxxxxxx> <1096327658.1729.19.camel@xxxxxxxxxxxxxxxxxxxxx> <16729.9326.93269.422940@xxxxxxxxxxxx> <20040928111906.GB29961@xxxxxxxxxxxxxxxxxxxxxxx> <1096375700.8659.235.camel@xxxxxxxxxxxxxxxx> <20040928133334.GW31616@xxxxxxxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 2004-09-28 at 09:33, Thomas Graf wrote:
> > Speaking of generic stats; i have a patch netlink ready which may need
> > some extensions. I did post it  a while back on netdev but didnt get
> > feedback.
> The code looks good and I couldn't spot any errors but I'm not
> sure if the locking in gen_copy_[x]stats is a good thing.
> Shouldn't that be done earlier by the caller? 

In the netsched code that became a portability issue; Dave fixed it
there, so i just replicated here. If you feel like doing something
clever you are welcome to submit a patch.

> This prevents
> corruption but it allows duplicated TLVs in an skb. I suggest
> to make the caller have a lock on his data and only allow one
> dumper at the same time until the dump is complete, or at least
> provide a lockless variant for callers doing the locking on
> their own.

Reminds me:
gnet_stats needs to have TLVs embedded in it.
bytes,drops, packets are generic enough; others are not.
So if we add a length field then we can add TLVs for things like
QSTATS = { qlen, backlog}  etc.
This means we could then allow for adding a lot of different
stats. A big lesson from current tc_stats.


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