netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: Huascar Tejeda <htejeda@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: reset network device counters on the fly
Date: Tue, 06 Jan 2009 18:29:45 -0800	[thread overview]
Message-ID: <49641399.80305@hp.com> (raw)
In-Reply-To: <3375b4020901061808g527cb872ia64b47147783b91c@mail.gmail.com>

Huascar Tejeda wrote:
> Hello everyone,
> 
> This is my first post to the mailing list and also my first kernel patch.
> 
> There was an scenario where I needed to clear network device counters
> without shutting down the interface.
> With this patch I add this functionality to /proc/net/dev.
> 
> Usage example:
> echo clear eth0 > /proc/net/dev
> echo clear all > /proc/net/dev
> 
> Thanks for your comments and please feel free to reply with any
> suggestions you may have.

Having been at least once bitten as a patch submittor, I'll point-out 
that patches are generally requested to be inline, not attachments. 
Also, in any kernel tree there should be a file describing how a patch 
should be put together and what addtional bits of information need to be 
included.  That file is ./Documentation/SubmittingPatches.

Finally, my recollection is this same sort of thing (zeroing counters) 
has been proposed before, and shot-down.  Doesn't a priori mean it will 
be shot-down this time, but it suggests the chances are slim.  You can 
probably find the discussion in one or more of the various archives for 
the netdev list.  For those situations where you want to know the 
statistics for a given interval, you can snap the stats to files at 
either end of the interval and run them through "beforeafter" or 
something similar:

http://ftp.cup.hp.com/dist/networking/tools/

rick jones
wondering what has become of his ethtool patch to recognize speeds other 
than 10/100/1000/10000... perhaps it too tripped over some of the above :(

  reply	other threads:[~2009-01-07  2:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07  2:08 [PATCH] net: reset network device counters on the fly Huascar Tejeda
2009-01-07  2:29 ` Rick Jones [this message]
2009-01-07  3:17   ` Huascar Tejeda
2009-01-07  3:54     ` Stephen Hemminger
2009-01-07  7:23 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49641399.80305@hp.com \
    --to=rick.jones2@hp.com \
    --cc=htejeda@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).