[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080528221118.63da4092.akpm@linux-foundation.org>
Date: Wed, 28 May 2008 22:11:18 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: James Cammarata <jimi@...x.net>
Cc: linux-kernel@...r.kernel.org,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: add ability to clear stats via ethtool -
e1000/pcnet32
On Wed, 28 May 2008 20:45:18 -0500 James Cammarata <jimi@...x.net> wrote:
> I had originally submitted this ability as a patch to procfs, and
> general consensus was that it seemed "hackish" to do it that way. It
> was suggested that it be implemented as a feature of ethtool, so I
> thought I'd take on the challenge and add it that way.
>
> I've laid the groundwork here, and added the ability to two of the
> drivers for which I have hardware to test on (e1000 and pcnet32). I
> also added the code required to call this functionality to the ethtool
> code base, and have been using that to test my changes (using -z as the
> flag to ethtool for clearing stats for now).
>
> If this is an acceptable start, I will gladly start working on adding
> this to as many drivers as possible (we do have some bnx2 hardware,
> though I'm not sure if it's available for testing).
>
> Some other sys-admins have mentioned to me that ethtool doesn't work
> sometimes and they fall back to using mii-tool to configure interfaces,
> so I'd still like to have the procfs change implemented to accommodate
> that hardware, but I agree, this is a better way forward.
You didn't provide a reason from adding this feature to the kernel.
Many of the kernel's accounting accumulators cannot be reset. We
handle that in userspace tools by using subtraction.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists