All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eilon Greenstein" <eilong@broadcom.com>
To: "Michal Schmidt" <mschmidt@redhat.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Dmitry Kravkov" <dmitry@broadcom.com>,
	"Vladislav Zolotarov" <vladz@broadcom.com>
Subject: Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
Date: Mon, 15 Aug 2011 15:33:05 +0300	[thread overview]
Message-ID: <1313411585.31417.35.camel@lb-tlvb-eilong.il.broadcom.com> (raw)
In-Reply-To: <4E490A1E.3060209@redhat.com>

On Mon, 2011-08-15 at 04:59 -0700, Michal Schmidt wrote:
> On 08/15/2011 12:54 PM, Eilon Greenstein wrote:
> > On Fri, 2011-08-12 at 07:33 -0700, Michal Schmidt wrote:
> >> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
> >> index c423504..648e165 100644
> >> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
> >> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
> >> @@ -1220,6 +1220,7 @@ struct bnx2x {
> >>   	struct cmng_struct_per_port cmng;
> >>   	u32			vn_weight_sum;
> >>   	u32			mf_config[E1HVN_MAX];
> >> +	bool			prev_max_cfg_invalid[E1HVN_MAX];
> > The warning is always for the current VN, so if you insist on showing a
> > warning only once on a board with invalid configuration, you can use a
> > single boolean.
> 
> bnx2x_cmng_fns_init() iterates over VNs:
> 
>       for (vn = VN_0; vn < E1HVN_MAX; vn++)
>               bnx2x_init_vn_minmax(bp, vn);
> 
> and bnx2x_init_vn_minmax() calls bnx2x_extract_max_cfg() on the given 
> VN, so it seems that the warning can be produced for a non-current VN.

You are right, only one function (the PMF) will call this code for all
functions. But I suspect that if you have zero values, you will have
them for all VNs - is that the case? If so, you can still warn only
once. Adding 4 boolean variables to the bnx2x structure just to overcome
a bad configuration seems excessive to me.





  reply	other threads:[~2011-08-15 12:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 14:33 [PATCH] bnx2x: suppress repeated error messages about Max BW Michal Schmidt
2011-08-15 10:54 ` Eilon Greenstein
2011-08-15 11:59   ` Michal Schmidt
2011-08-15 12:33     ` Eilon Greenstein [this message]
2011-08-15 15:13       ` Michal Schmidt
2011-08-15 18:47         ` Eilon Greenstein
2011-08-16 11:38           ` Michal Schmidt
2011-08-16 12:45             ` Eilon Greenstein
2011-08-17 15:50               ` [PATCH] bnx2x: downgrade Max BW error message to debug Michal Schmidt
2011-08-17 17:44                 ` Eilon Greenstein
2011-08-18 11:37                   ` Michal Schmidt
2011-08-18 12:22                     ` Eilon Greenstein
2011-08-19  4:51                       ` 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=1313411585.31417.35.camel@lb-tlvb-eilong.il.broadcom.com \
    --to=eilong@broadcom.com \
    --cc=dmitry@broadcom.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladz@broadcom.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.