Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 598662 - [RHEL6] Incorrect packet statistics with s2io driver
Summary: [RHEL6] Incorrect packet statistics with s2io driver
Keywords:
Status: CLOSED DUPLICATE of bug 611869
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Michal Schmidt
QA Contact: Network QE
URL:
Whiteboard:
Depends On:
Blocks: 645454
TreeView+ depends on / blocked
 
Reported: 2010-06-01 19:48 UTC by Bryan Mason
Modified: 2011-03-24 03:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 598650
Environment:
Last Closed: 2011-01-14 14:47:21 UTC
Target Upstream Version:


Attachments (Terms of Use)
s2io: read rx_packets from the hardware stats (deleted)
2010-06-04 19:56 UTC, Michal Schmidt
no flags Details | Diff
snapshots of /proc/net/dev taken every 5 seconds (deleted)
2010-06-15 23:50 UTC, Bryan Mason
no flags Details
s2io: resolve statistics issues (deleted)
2010-09-15 14:33 UTC, Jon Mason
no flags Details | Diff

Description Bryan Mason 2010-06-01 19:48:45 UTC
+++ This bug was initially created as a clone of Bug #598650 +++

Description of problem:

    The s2io driver appears to count multicast packets incorrectly (as
    reflected in the data in /proc/net/dev) if there is no process
    available to receive the packets.  

    If there is a process receiving the multicast packets, /proc/net/dev
    (sampled at regular intervals) looks like:

    Inter-|   Receive                                                
     face |bytes    packets errs drop fifo frame compressed multicast
      eth2:  138120    2302    0    0    0     0          0      2302
      eth2:  286800    4780    0    0    0     0          0      4780
      eth2:  435540    7259    0    0    0     0          0      7259
      eth2:  584340    9739    0    0    0     0          0      9739
      eth2:  733140   12219    0    0    0     0          0     12218
      eth2:  881880   14698    0    0    0     0          0     14698
      eth2: 1030620   17177    0    0    0     0          0     17177

    However, if there is no process to receive the multicast packets,
    /proc/net/dev (again sampled at regular intervals) will look like:

    Inter-|   Receive                                                
     face |bytes    packets errs drop fifo frame compressed multicast
      eth2: 1408140   23469    0    0    0     0          0     23469
      eth2: 1408140   23469    0    0    0     0          0     26547
      eth2: 1408140   23469    0    0    0     0          0     29026
      eth2: 1408140   23469    0    0    0     0          0     31505
      eth2: 1408140   23469    0    0    0     0          0     33983
      eth2: 1408140   23469    0    0    0     0          0     36463
      eth2: 1408140   23469    0    0    0     0          0     38942
      eth2: 1408140   23469    0    0    0     0          0     41421

    The number of "Receive packets" does not increase, but the value
    of "Receive multicast" does increase.  My understanding is that
    this should never happen -- the received packets value should
    include the number of received multicast packets.

Version-Release number of selected component (if applicable):

    kernel-2.6.18-194.el5 

How reproducible:

    100% with the proper hardware.

Steps to Reproduce:

    1.  Run a program (like the one attached) on a "sender" system.

    2.  Watch /proc/net/dev on a "receiver" system with the proper
        NIC hardware.
  
Actual results:

    The "Receive multicast" value for the s2io NIC will increase, but
    the "Receive packets" value will not.

Expected results:

    Both the "Receive multicast" and "Receive packets" value should
    increase.  "Receive packets" should always be greater than or
    equal to "Receive Multicast".

Additional info:

    This has been reproduced on a RHEL 5.5. system with version
    2.0.25.1 of the s2io driver with an "S2io Inc. Xframe II 10Gbps
    Ethernet (rev 02)" NIC, PCI ID 17d5:5832 (from lspci).

    Inspecting the driver source, it seems that the multicast
    statistics are retrieved from the NIC in s2io_get_stats() whereas
    the number of received packets is incremented in rx_osm_handler().

--- Additional comment from bmason@redhat.com on 2010-06-01 15:33:34 EDT ---

Minor correction from the description above -- the s2io driver version should have been "2.0.26.25", not "2.0.25.1".  Sorry for any confusion this may have caused.

--- Additional comment from bmason@redhat.com on 2010-06-01 15:35:00 EDT ---

Created an attachment (id=418785)
Test Program

Comment 1 Michal Schmidt 2010-06-04 19:56:30 UTC
Created attachment 421341 [details]
s2io: read rx_packets from the hardware stats

This patch should fix it.

Submitted a build to Brew:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=2496142

Comment 2 Bryan Mason 2010-06-15 23:50:56 UTC
Created attachment 424321 [details]
snapshots of /proc/net/dev taken every 5 seconds

While running the test kernel (2.6.32-33.el6.bz598662.x86_64) the value for "Receive Multicast" decreases in /proc/net/dev.  This shouldn never happen, right?

It doesn't look like the patch should affect the value of "Receive Multicast," so I've asked for a retest with the standard RHEL-6-Beta kernel to see if the problem exists there as well.  If it does, then I'll open up a separate bug.

Comment 3 Michal Schmidt 2010-06-16 08:30:52 UTC
Right, the decreasing is certainly strange and it's not supposed to happen.

Comment 4 Bryan Mason 2010-07-06 18:38:37 UTC
It appears that the problem with Receive Multicast going backwards exists in the stock RHEL 6 kernel.  I've opened Bug 611869 for this issue.

Comment 6 Jon Mason 2010-09-15 14:33:36 UTC
Created attachment 447485 [details]
s2io: resolve statistics issues

This patch is the official bug fix for the issue, and was included in mainline with commit 4a49043223e5047c8f60a09f7b2927a2e6e8dfc7.

This patch was also added to bug 611869.

Comment 7 RHEL Product and Program Management 2010-10-05 01:58:15 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 8 Michal Schmidt 2011-01-14 14:47:21 UTC

*** This bug has been marked as a duplicate of bug 611869 ***


Note You need to log in before you can comment on or make changes to this bug.