Subject: Re: [RFC PATCH 1/2] netdev: buffer infrastructure to log network driver's information

From: Neil Horman <[email-masked]>
Date: Mon, 5 Apr 2010 20:10:34 -0400

On Mon, Apr 05, 2010 at 12:31:55PM -0700, David Miller wrote:
> From: Eric Dumazet <[email-masked]>
> Date: Mon, 05 Apr 2010 10:42:26 +0200
> 
> > Le lundi 05 avril 2010 à 15:52 +0900, Koki Sanagi a écrit :
> >> This patch implements buffer infrastructure under driver/net.
> >> This buffer records information from network driver.
> >> 
> >> Signed-off-by: Koki Sanagi <[email-masked]>
> >> ---
> >>   drivers/net/Kconfig     |    8 +
> >>   drivers/net/Makefile    |    1 +
> >>   drivers/net/ndrvbuf.c   |  535 +++++++++++++++++++++++++++++++++++++++++++++++
> >>   include/linux/ndrvbuf.h |   57 +++++
> >>   4 files changed, 601 insertions(+), 0 deletions(-)
> >> 
> > 
> > Wow, 600 lines... thats what I call bloat...
> 
> And we have all sorts of facilities for creating filesystem
> streams and ring buffers of debug information.
> 
> You could even hook into 'perf' to log and process these
> events in probably like 12 lines of code.
> 
I'm still having a hard time understanding why this approach is preferable to
the previous approach you took using tracepoints.  Granted you can't get driver
internal state as easily, but its generic and doesn't do...this.
Neil