From: "David S. Miller" <davem@redhat.com>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev@oss.sgi.com
Subject: Re: How to count tx and rx bytes?
Date: Mon, 15 Dec 2003 16:08:10 -0800 [thread overview]
Message-ID: <20031215160810.5cea9216.davem@redhat.com> (raw)
In-Reply-To: <3FDE4109.7090603@candelatech.com>
On Mon, 15 Dec 2003 15:17:29 -0800
Ben Greear <greearb@candelatech.com> wrote:
> Well, I was assuming that the stats polling is a fixed cost O(1),
> where-as the per-packet calculation is O(n). I am quite sure this
> assumption is true for e1000, but I have not looked at tg3. So, for
> e1000, the cost of subtracting out the FCS would be basically free.
I see, I misunderstood your idea. That would work, and yes all of
the effort would be expended at netdev->get_stats() time.
> All that said, from Randy's email, it appears we should be including
> the FCS anyway...
Yes, indeed. So the drivers that do not have hardware statistics
doing this, and are using skb->len, need to add on the FCS length
(which is 4 bytes right?) when accumulating stats->* values.
Sounds like a nice janitor job :)
next prev parent reply other threads:[~2003-12-16 0:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-15 20:03 How to count tx and rx bytes? Ben Greear
2003-12-15 22:17 ` David S. Miller
2003-12-15 22:40 ` Randy.Dunlap
2003-12-15 23:19 ` Donald Becker
2003-12-15 23:22 ` Randy.Dunlap
2003-12-15 22:46 ` Ben Greear
2003-12-15 22:54 ` David S. Miller
2003-12-15 23:17 ` Ben Greear
2003-12-16 0:08 ` David S. Miller [this message]
2003-12-16 13:38 ` Rask Ingemann Lambertsen
2003-12-16 15:45 ` Randy.Dunlap
2003-12-16 19:38 ` Ben Greear
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=20031215160810.5cea9216.davem@redhat.com \
--to=davem@redhat.com \
--cc=greearb@candelatech.com \
--cc=netdev@oss.sgi.com \
/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).