netdev
[Top] [All Lists]

Re: [PATCH 2/3] NET: Generic rate estimator

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: [PATCH 2/3] NET: Generic rate estimator
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Sun, 3 Oct 2004 16:14:36 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20041003213954.GI14344@xxxxxxxxxxxxxx>
References: <20041003213124.GG14344@xxxxxxxxxxxxxx> <20041003213954.GI14344@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sun, 3 Oct 2004 23:39:54 +0200
Thomas Graf <tgraf@xxxxxxx> wrote:

> Introduces a generic rate estimator based on timers. Patch is based on
> Jamal's patch and adapted to the new generic network statistics API.

First, how does this new thing ever get built into the tree?

Second:

> +#if (HZ%4) != 0
> +#error Bad HZ value.
> +#endif

This is going to fail to compile on a few platforms, namely m68knommu
and v850 which have configurations that result in using a HZ value
of 50 and 122 respectively.

Otherwise I mostly like all of the new generic stats stuff, although
I do have one question:

+int
+gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,
+       int xstats_type, spinlock_t *lock, struct gnet_dump *d)
+{
 ...
+       return gnet_stats_copy(d, type, NULL, 0);

What is this dummy zero-sized RTA_PUT() being done for
(via the gnet_stats_copy() call with size==0 arg)?

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