All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: "Maciej Żenczykowski" <zenczykowski@gmail.com>,
	"Maciej Żenczykowski" <maze@google.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Yuval Mintz" <yuvalmin@broadcom.com>
Subject: RE: [PATCH] bnx2x: fix occasional statistics off-by-4GB error
Date: Sun, 17 Mar 2013 13:10:37 +0000	[thread overview]
Message-ID: <504C9EFCA2D0054393414C9CB605C37F20BE6A2B@SJEXCHMB06.corp.ad.broadcom.com> (raw)
In-Reply-To: <1363384577-21287-1-git-send-email-zenczykowski@gmail.com>

> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Maciej ?enczykowski
> Sent: Friday, March 15, 2013 11:56 PM
> To: Maciej Żenczykowski; David S. Miller
> Cc: netdev@vger.kernel.org; Yuval Mintz
> Subject: [PATCH] bnx2x: fix occasional statistics off-by-4GB error
> 
> From: Maciej Żenczykowski <maze@google.com>
> 
> The UPDATE_QSTAT function introduced on February 15, 2012
> in commit 1355b704b9ba "bnx2x: consistent statistics after
> internal driver reload" incorrectly fails to handle overflow
> during addition of the lower 32-bit field of a stat.
> 
> This bug is present since 3.4-rc1 and should thus be considered
> a candidate for stable 3.4+ releases.
> 
> Google-Bug-Id: 8374428
> Signed-off-by: Maciej Żenczykowski <maze@google.com>
> Cc: Mintz Yuval <yuvalmin@broadcom.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h
> index 364e37ecbc5c..198f6f1c9ad5 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h
> @@ -459,8 +459,9 @@ struct bnx2x_fw_port_stats_old {
> 
>  #define UPDATE_QSTAT(s, t) \
>  	do { \
> -		qstats->t##_hi = qstats_old->t##_hi + le32_to_cpu(s.hi); \
>  		qstats->t##_lo = qstats_old->t##_lo + le32_to_cpu(s.lo); \
> +		qstats->t##_hi = qstats_old->t##_hi + le32_to_cpu(s.hi) \
> +			+ ((qstats->t##_lo < qstats_old->t##_lo) ? 1 : 0); \
>  	} while (0)
> 
>  #define UPDATE_QSTAT_OLD(f) \
> --
> 1.8.1.3
> 

Probably this commit resolved the issue:

commit bef05406ac0ea6f468e1e25e9934f3011ea9259b
Author: Dmitry Kravkov <dmitry@broadcom.com>
Date:   Tue Sep 11 04:34:08 2012 +0000

    bnx2x: Avoid sending multiple statistics queries

Can you try it pls?

Thanks

  reply	other threads:[~2013-03-17 13:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 21:03 bnx2x statistics occasionally wrong by near multiples of 4GB Maciej Żenczykowski
2013-03-15 21:56 ` [PATCH] bnx2x: fix occasional statistics off-by-4GB error Maciej Żenczykowski
2013-03-17 13:10   ` Dmitry Kravkov [this message]
2013-03-17 18:24     ` David Miller
2013-03-17 19:37       ` Eilon Greenstein
2013-03-17 20:25         ` Eric Dumazet
2013-03-17 20:53           ` Eilon Greenstein
2013-03-17 23:17             ` Eric Dumazet
2013-03-18  7:27               ` Eilon Greenstein
2013-03-18  6:18             ` Maciej Żenczykowski
2013-03-18 10:06               ` Eilon Greenstein
2013-03-18 17:13                 ` David Miller
2013-03-18 19:54                   ` Maciej Żenczykowski
2013-03-18 20:05                     ` David Miller
2013-03-18 20:06                     ` Maciej Żenczykowski
2013-03-18 20:35                       ` Eric Dumazet
2013-03-18 20:36                       ` Maciej Żenczykowski
2013-03-21 21:23                         ` Maciej Żenczykowski
2013-03-21 21:25                           ` 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=504C9EFCA2D0054393414C9CB605C37F20BE6A2B@SJEXCHMB06.corp.ad.broadcom.com \
    --to=dmitry@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=yuvalmin@broadcom.com \
    --cc=zenczykowski@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.