netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mschmidt@redhat.com
Cc: netdev@vger.kernel.org, Ramkrishna.Vepa@exar.com,
	sivakumar.subramani@exar.com, sreenivasa.honnur@exar.com
Subject: Re: [PATCH] s2io: read rx_packets count from the hardware stats
Date: Mon, 28 Jun 2010 23:52:23 -0700 (PDT)	[thread overview]
Message-ID: <20100628.235223.191401839.davem@davemloft.net> (raw)
In-Reply-To: <20100624233230.5864.67401.stgit@leela.lan>

From: Michal Schmidt <mschmidt@redhat.com>
Date: Fri, 25 Jun 2010 01:32:32 +0200

> Most of the statistics the s2io driver provides in /proc/net/dev
> it reads directly from the hardware counters. For some reason it does
> not do that for rx_packets. It counts rx_packets purely in software.
> 
> A customer reported a bug where in /proc/net/dev the 'multicast' counter
> was increasing faster than 'packets' ( = rx_packets in the source code).
> This confuses userspace, especially snmpd.
> 
> The hardware provides a counter for the total number of received
> frames (RMAC_VLD_FRMS) which the driver can use for the rx_packets
> statistic. By reading both statistics from the hardware it makes sure
> that all multicast frames are included in the total.
> 
> The customer tested a patch like this (only modified for RHEL5) with
> S2io Inc. Xframe II 10Gbps Ethernet (rev 02)
> and it fixed the problem.
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Please also use the rmac_data_octets HW statistic for rx_bytes
otherwise rx_bytes will be out of sync with the other stats too.

  reply	other threads:[~2010-06-29  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 23:32 [PATCH] s2io: read rx_packets count from the hardware stats Michal Schmidt
2010-06-29  6:52 ` David Miller [this message]
2010-06-30  0:54 ` Jon Mason
2010-07-02 19:13   ` [PATCH] s2io: resolve statistics issues Jon Mason
2010-07-03  5:30     ` 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=20100628.235223.191401839.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Ramkrishna.Vepa@exar.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sivakumar.subramani@exar.com \
    --cc=sreenivasa.honnur@exar.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).