From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Dmitry Kravkov <dmitry@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, eilong@broadcom.com,
Ariel Elior <ariele@broadcom.com>
Subject: Re: [PATCH net v4 1/6] bnx2x: properly initialize statistic counters
Date: Mon, 12 Aug 2013 16:08:18 -0400 [thread overview]
Message-ID: <20130812200818.GA20031@d2.synalogic.ca> (raw)
In-Reply-To: <1375738544-8695-2-git-send-email-dmitry@broadcom.com>
On 2013/08/06 00:35, Dmitry Kravkov wrote:
> This prevent second statistics query be sent before first one is complete.
> This is required since two outstanding queries may cause FW assert.
>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Ariel Elior <ariele@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
> index 98366ab..a22ad61 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
> @@ -1589,12 +1589,17 @@ void bnx2x_memset_stats(struct bnx2x *bp)
>
> void bnx2x_stats_init(struct bnx2x *bp)
> {
> - int /*abs*/port = BP_PORT(bp);
> + struct stats_counter *counters = &bp->fw_stats_data->storm_counters;
> int mb_idx = BP_FW_MB_IDX(bp);
> + int port = BP_PORT(bp);
>
> bp->stats_pending = 0;
> bp->executer_idx = 0;
> bp->stats_counter = 0;
> + counters->xstats_counter = cpu_to_le16(0xFFFF);
> + counters->tstats_counter = cpu_to_le16(0xFFFF);
> + counters->ustats_counter = cpu_to_le16(0xFFFF);
> + counters->cstats_counter = cpu_to_le16(0xFFFF);
I think the following code executed a little later becomes redundant:
static void bnx2x_prep_fw_stats_req(struct bnx2x *bp)
{
[...]
/* prepare to the first stats ramrod (will be completed with
* the counters equal to zero) - init counters to somethig different.
*/
memset(&bp->fw_stats_data->storm_counters, 0xff,
sizeof(struct stats_counter));
next prev parent reply other threads:[~2013-08-12 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 21:35 [PATCH net v4 0/6] bnx2x: fixes Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 1/6] bnx2x: properly initialize statistic counters Dmitry Kravkov
2013-08-12 20:08 ` Benjamin Poirier [this message]
2013-08-12 22:48 ` Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 2/6] bnx2x: protect different statistics flows Dmitry Kravkov
2013-08-05 23:26 ` David Miller
2013-08-05 21:35 ` [PATCH net v4 3/6] bnx2x: update fairness parameters following DCB negotiation Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 4/6] bnx2x: fix memory leak in VF Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 5/6] bnx2x: fix PTE write access error Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 6/6] bnx2x: prevent crash in shutdown flow with CNIC Dmitry Kravkov
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=20130812200818.GA20031@d2.synalogic.ca \
--to=benjamin.poirier@gmail.com \
--cc=ariele@broadcom.com \
--cc=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
/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.