lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Aug 2011 15:33:05 +0300
From:	"Eilon Greenstein" <eilong@...adcom.com>
To:	"Michal Schmidt" <mschmidt@...hat.com>
cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Dmitry Kravkov" <dmitry@...adcom.com>,
	"Vladislav Zolotarov" <vladz@...adcom.com>
Subject: Re: [PATCH] bnx2x: suppress repeated error messages about Max
 BW

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.




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ