Due to a recent update on Javascript code a full page refresh on your browser might be needed.
Bug 515274 - /proc/net/dev sometimes contains bogus values (BCM5706)
Summary: /proc/net/dev sometimes contains bogus values (BCM5706)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Flavio Leitner
QA Contact: Hangbin Liu
URL:
Whiteboard:
Depends On:
Blocks: 527748
TreeView+ depends on / blocked
 
Reported: 2009-08-03 15:07 UTC by Flavio Leitner
Modified: 2018-10-20 04:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 424581
: 527748 (view as bug list)
Environment:
Last Closed: 2011-02-16 15:58:34 UTC
Target Upstream Version:


Attachments (Terms of Use)
bnx2-fix-counter-corruption-5706.patch (1.67 KB, patch)
2009-09-02 19:45 UTC, Flavio Leitner
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 15:14:55 UTC

Description Flavio Leitner 2009-08-03 15:07:30 UTC
+++ This bug was initially created as a clone of Bug #424581 +++

The network utilization graphics in ganglia report shows peaks of petabytes,
when the network interface is just Gigabit eth

Broadcom developer (Michael Chan) confirmed that NIC BCM5706 and BCM5708
are very similar in design so BCM5706 could suffer the same problem
described in http://lists.openwall.net/netdev/2007/06/04/81 he actually
provide a patch but it's not possible to test locally.

The host is rhel4.5 but it is running latest security updates, including
the kernel, from rhel4.7. here is the kernel info:

<root@446 (~)>$ uname -a
Linux 446 2.6.9-78.0.22.ELsmp #1 SMP Fri Apr 24 12:48:19 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
<root@446 (~)>$ modinfo bnx2
filename:       /lib/modules/2.6.9-78.0.22.ELsmp/kernel/drivers/net/bnx2.ko
parm:           disable_msi:Disable Message Signaled Interrupt (MSI)
version:        1.6.9 478DCC31494367381918DC4
license:        GPL
description:    Broadcom NetXtreme II BCM5706/5708 Driver
author:         Michael Chan <mchan@broadcom.com>
alias:          pci:v000014E4d0000163Asv*sd*bc*sc*i*
alias:          pci:v000014E4d00001639sv*sd*bc*sc*i*
alias:          pci:v000014E4d000016ACsv*sd*bc*sc*i*
alias:          pci:v000014E4d000016AAsv*sd*bc*sc*i*
alias:          pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i*
alias:          pci:v000014E4d0000164Csv*sd*bc*sc*i*
alias:          pci:v000014E4d0000164Asv*sd*bc*sc*i*
alias:          pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i*
alias:          pci:v000014E4d0000164Asv0000103Csd00003101bc*sc*i*
depends:        
vermagic:       2.6.9-78.0.22.ELsmp SMP gcc-3.4
<root@446 (~)>$

as you can see, the bnx2 driver version is > 1.5.

I just want to point out that the fix that was included in version 1.5 is 
for NIC BCM5708 (you can see it from the patch that was submitted to the 
kernel at that time), nic BCM5706 was not detected having the same issue,
and according to Broadcom maintainer, both NIC has similar design so it 
is possible they both suffer same issue, that is why his patch is minor
correction to the original patch (to include nic 5706 id in the check). 
Patch diff shows that wherever 5708 is checked 5706 must be checked too, 
like this:

- if (CHIP_NUM(bp) == CHIP_NUM_5708)
+ if (CHIP_NUM(bp) == CHIP_NUM_5706 || CHIP_NUM(bp) == CHIP_NUM_5708) 

Full patch:
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 2486a65..5079806 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4589,7 +4589,7 @@ bnx2_init_chip(struct bnx2 *bp)
        REG_WR(bp, BNX2_HC_CMD_TICKS,
               (bp->cmd_ticks_int << 16) | bp->cmd_ticks);

-       if (CHIP_NUM(bp) == CHIP_NUM_5708)
+       if (CHIP_NUM(bp) == CHIP_NUM_5706 || CHIP_NUM(bp) == CHIP_NUM_5708)
                REG_WR(bp, BNX2_HC_STATS_TICKS, 0);
        else
                REG_WR(bp, BNX2_HC_STATS_TICKS, bp->stats_ticks);
@@ -5700,7 +5700,8 @@ bnx2_timer(unsigned long data)
                bnx2_reg_rd_ind(bp, BNX2_FW_RX_DROP_COUNT);

        /* workaround occasional corrupted counters */
-       if (CHIP_NUM(bp) == CHIP_NUM_5708 && bp->stats_ticks)
+       if ((CHIP_NUM(bp) == CHIP_NUM_5706 || CHIP_NUM(bp) == CHIP_NUM_5708) &&
+           bp->stats_ticks)
                REG_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd |
                                            BNX2_HC_COMMAND_STATS_NOW);
@@ -6609,7 +6610,7 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
                0xff;

        bp->stats_ticks = coal->stats_block_coalesce_usecs;
-       if (CHIP_NUM(bp) == CHIP_NUM_5708) {
+       if (CHIP_NUM(bp) == CHIP_NUM_5706 || CHIP_NUM(bp) == CHIP_NUM_5708) {
                if (bp->stats_ticks != 0 && bp->stats_ticks != USEC_PER_SEC)
                        bp->stats_ticks = USEC_PER_SEC;
        }

Comment 4 Issue Tracker 2009-08-04 19:58:38 UTC
Event posted on 08-04-2009 04:58pm BRT by fbl

Hi,

Here is the brew url of kernel build based on 2.6.9-78.0.22.EL 
with the suggested patch applied:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1916644

Please, give a try and report back your results.

thanks,
Flavio

Internal Status set to 'Waiting on Support'

This event sent from IssueTracker by fbl 
 issue 323356

Comment 5 Flavio Leitner 2009-09-02 19:45:01 UTC
Created attachment 359578 [details]
bnx2-fix-counter-corruption-5706.patch

Customer said the patch worked.
TAG: kernel-2_6_9-89_0_9_EL_it323356_1
The brew build is based on 2.6.9-89.0.9.EL with the patch applied.
https://brewweb.devel.redhat.com/taskinfo?taskID=1934605

Flavio

Comment 7 RHEL Program Management 2009-09-02 20:17:06 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 Michael Chan 2009-09-09 17:19:36 UTC
Please use slightly different, but functionally equivalent upstream patch:

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commit;h=61d9e3fa7eacabfb7879e3da91709f1a5420c507

Comment 13 Vivek Goyal 2010-09-17 17:52:16 UTC
Committed in 89.36.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 18 errata-xmlrpc 2011-02-16 15:58:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0263.html


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