* [PATCH] bnx2x: suppress repeated error messages about Max BW
@ 2011-08-12 14:33 Michal Schmidt
2011-08-15 10:54 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-12 14:33 UTC (permalink / raw)
To: netdev; +Cc: dmitry, vladz
When a VN is configured with invalid Max BW, the error does not have to
be logged repeatedly and fill the logs.
Warn only once when the bad configuration is detected on boot, or when
the configuration changes dynamically from good to bad.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 ++---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 21 +++++++++++----------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
4 files changed, 15 insertions(+), 14 deletions(-)
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];
u32 mf2_config[E2_FUNC_MAX];
u32 path_has_ovlan; /* E3 */
u16 mf_ov;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index d724a18..a5216a9 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -841,8 +841,7 @@ u16 bnx2x_get_mf_speed(struct bnx2x *bp)
{
u16 line_speed = bp->link_vars.line_speed;
if (IS_MF(bp)) {
- u16 maxCfg = bnx2x_extract_max_cfg(bp,
- bp->mf_config[BP_VN(bp)]);
+ u16 maxCfg = bnx2x_extract_max_cfg(bp, BP_VN(bp));
/* Calculate the current MAX line speed limit for the MF
* devices
@@ -1153,7 +1152,7 @@ void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value)
/* load old values */
u32 mf_cfg = bp->mf_config[BP_VN(bp)];
- if (value != bnx2x_extract_max_cfg(bp, mf_cfg)) {
+ if (value != bnx2x_extract_max_cfg(bp, BP_VN(bp))) {
/* leave all but MAX value */
mf_cfg &= ~FUNC_MF_CFG_MAX_BW_MASK;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 223bfee..6e75c42 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1473,19 +1473,20 @@ void bnx2x_release_phy_lock(struct bnx2x *bp);
* bnx2x_extract_max_cfg - extract MAX BW part from MF configuration.
*
* @bp: driver handle
- * @mf_cfg: MF configuration
+ * @vn: vnic index
*
*/
-static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
+static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, int vn)
{
- u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
- FUNC_MF_CFG_MAX_BW_SHIFT;
- if (!max_cfg) {
- BNX2X_ERR("Illegal configuration detected for Max BW - "
- "using 100 instead\n");
- max_cfg = 100;
- }
- return max_cfg;
+ u16 max_cfg = (bp->mf_config[vn] & FUNC_MF_CFG_MAX_BW_MASK) >>
+ FUNC_MF_CFG_MAX_BW_SHIFT;
+
+ if (!max_cfg && !bp->prev_max_cfg_invalid[vn])
+ BNX2X_ERR("Illegal configuration detected for Max BW "
+ "on vn %d - using 100 instead\n", vn);
+ bp->prev_max_cfg_invalid[vn] = !max_cfg;
+
+ return max_cfg ?: 100;
}
#endif /* BNX2X_CMN_H */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 1507091..a952f84 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -2335,7 +2335,7 @@ static void bnx2x_init_vn_minmax(struct bnx2x *bp, int vn)
vn_max_rate = 0;
} else {
- u32 maxCfg = bnx2x_extract_max_cfg(bp, vn_cfg);
+ u32 maxCfg = bnx2x_extract_max_cfg(bp, vn);
vn_min_rate = ((vn_cfg & FUNC_MF_CFG_MIN_BW_MASK) >>
FUNC_MF_CFG_MIN_BW_SHIFT) * 100;
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
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
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-15 10:54 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Fri, 2011-08-12 at 07:33 -0700, Michal Schmidt wrote:
> When a VN is configured with invalid Max BW, the error does not have to
> be logged repeatedly and fill the logs.
> Warn only once when the bad configuration is detected on boot, or when
> the configuration changes dynamically from good to bad.
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
>
> drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 ++---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 21 +++++++++++----------
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
> 4 files changed, 15 insertions(+), 14 deletions(-)
>
> 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.
Thanks,
Eilon
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
2011-08-15 10:54 ` Eilon Greenstein
@ 2011-08-15 11:59 ` Michal Schmidt
2011-08-15 12:33 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-15 11:59 UTC (permalink / raw)
To: eilong; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
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.
Michal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
2011-08-15 11:59 ` Michal Schmidt
@ 2011-08-15 12:33 ` Eilon Greenstein
2011-08-15 15:13 ` Michal Schmidt
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-15 12:33 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
2011-08-15 12:33 ` Eilon Greenstein
@ 2011-08-15 15:13 ` Michal Schmidt
2011-08-15 18:47 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-15 15:13 UTC (permalink / raw)
To: eilong; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On 08/15/2011 02:33 PM, Eilon Greenstein wrote:
> On Mon, 2011-08-15 at 04:59 -0700, Michal Schmidt wrote:
>> 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?
A tester reported getting only these 4 messages with the patch applied:
[bnx2x_extract_max_cfg:1074(eth4)]Illegal configuration detected for Max
BW on vn 2 - using 100 instead
[bnx2x_extract_max_cfg:1074(eth5)]Illegal configuration detected for Max
BW on vn 2 - using 100 instead
[bnx2x_extract_max_cfg:1074(eth6)]Illegal configuration detected for Max
BW on vn 3 - using 100 instead
[bnx2x_extract_max_cfg:1074(eth7)]Illegal configuration detected for Max
BW on vn 3 - using 100 instead
This suggests that VNs 0 and 1 had non-zero Max BW configuration.
Michal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
2011-08-15 15:13 ` Michal Schmidt
@ 2011-08-15 18:47 ` Eilon Greenstein
2011-08-16 11:38 ` Michal Schmidt
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-15 18:47 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Mon, 2011-08-15 at 08:13 -0700, Michal Schmidt wrote:
> On 08/15/2011 02:33 PM, Eilon Greenstein wrote:
> > On Mon, 2011-08-15 at 04:59 -0700, Michal Schmidt wrote:
> >> 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?
>
> A tester reported getting only these 4 messages with the patch applied:
>
> [bnx2x_extract_max_cfg:1074(eth4)]Illegal configuration detected for Max
> BW on vn 2 - using 100 instead
> [bnx2x_extract_max_cfg:1074(eth5)]Illegal configuration detected for Max
> BW on vn 2 - using 100 instead
> [bnx2x_extract_max_cfg:1074(eth6)]Illegal configuration detected for Max
> BW on vn 3 - using 100 instead
> [bnx2x_extract_max_cfg:1074(eth7)]Illegal configuration detected for Max
> BW on vn 3 - using 100 instead
>
> This suggests that VNs 0 and 1 had non-zero Max BW configuration.
Michal - this is a great point of data! It helped me finding a bug in
that code - the code is not suitable for 4 port devices, it always
assumes 4 VN per PCI function, while in 4 port devices there are only 2
VN per PCI function. I assume that you are seeing this problem on a
57800 with 2x10G + 2x1G - and the 1G devices are in single function mode
and therefore you are seeing this error message. I will send a patch to
fix the problem on 4 port devices soon (after testing it for a while) -
please confirm that you are seeing this issue on 2x10G+2x1G 57800
device.
Now it all makes sense to me - it’s not just misconfigured board
workaround, this is a real issue :)
Thanks for helping in identifying it!
Eilon
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
2011-08-15 18:47 ` Eilon Greenstein
@ 2011-08-16 11:38 ` Michal Schmidt
2011-08-16 12:45 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-16 11:38 UTC (permalink / raw)
To: eilong; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On 08/15/2011 08:47 PM, Eilon Greenstein wrote:
> On Mon, 2011-08-15 at 08:13 -0700, Michal Schmidt wrote:
>> A tester reported getting only these 4 messages with the patch applied:
>>
>> [bnx2x_extract_max_cfg:1074(eth4)]Illegal configuration detected for Max
>> BW on vn 2 - using 100 instead
>> [bnx2x_extract_max_cfg:1074(eth5)]Illegal configuration detected for Max
>> BW on vn 2 - using 100 instead
>> [bnx2x_extract_max_cfg:1074(eth6)]Illegal configuration detected for Max
>> BW on vn 3 - using 100 instead
>> [bnx2x_extract_max_cfg:1074(eth7)]Illegal configuration detected for Max
>> BW on vn 3 - using 100 instead
>>
>> This suggests that VNs 0 and 1 had non-zero Max BW configuration.
>
> Michal - this is a great point of data! It helped me finding a bug in
> that code - the code is not suitable for 4 port devices, it always
> assumes 4 VN per PCI function, while in 4 port devices there are only 2
> VN per PCI function. I assume that you are seeing this problem on a
> 57800 with 2x10G + 2x1G - and the 1G devices are in single function mode
> and therefore you are seeing this error message. I will send a patch to
> fix the problem on 4 port devices soon (after testing it for a while) -
> please confirm that you are seeing this issue on 2x10G+2x1G 57800
> device.
Eilon,
the tester is seeing this with BCM57711E. It's a HP-Blade bl460c-g6 with
HP VirtualConnect. Quote from him:
hp-agents reports 4 dual port nic's, Linux kernel reports 8 identical
nic's but it's actual a blade with 2 LOM's (lan on motherboard) with
each one port. Via VC we present max 4 FlexNic's per port, but for
this server we present 2 FlexNic's per port.
The fun with Linux is that it always sees all FlexNic's devices even
if we configure 2 FlexNics via a VC profile on a port like on this
server.
Michal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: suppress repeated error messages about Max BW
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
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-16 12:45 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Tue, 2011-08-16 at 04:38 -0700, Michal Schmidt wrote:
> On 08/15/2011 08:47 PM, Eilon Greenstein wrote:
> > On Mon, 2011-08-15 at 08:13 -0700, Michal Schmidt wrote:
> >> A tester reported getting only these 4 messages with the patch applied:
> >>
> >> [bnx2x_extract_max_cfg:1074(eth4)]Illegal configuration detected for Max
> >> BW on vn 2 - using 100 instead
> >> [bnx2x_extract_max_cfg:1074(eth5)]Illegal configuration detected for Max
> >> BW on vn 2 - using 100 instead
> >> [bnx2x_extract_max_cfg:1074(eth6)]Illegal configuration detected for Max
> >> BW on vn 3 - using 100 instead
> >> [bnx2x_extract_max_cfg:1074(eth7)]Illegal configuration detected for Max
> >> BW on vn 3 - using 100 instead
> >>
> >> This suggests that VNs 0 and 1 had non-zero Max BW configuration.
> >
> > Michal - this is a great point of data! It helped me finding a bug in
> > that code - the code is not suitable for 4 port devices, it always
> > assumes 4 VN per PCI function, while in 4 port devices there are only 2
> > VN per PCI function. I assume that you are seeing this problem on a
> > 57800 with 2x10G + 2x1G - and the 1G devices are in single function mode
> > and therefore you are seeing this error message. I will send a patch to
> > fix the problem on 4 port devices soon (after testing it for a while) -
> > please confirm that you are seeing this issue on 2x10G+2x1G 57800
> > device.
>
> Eilon,
> the tester is seeing this with BCM57711E. It's a HP-Blade bl460c-g6 with
> HP VirtualConnect. Quote from him:
>
> hp-agents reports 4 dual port nic's, Linux kernel reports 8 identical
> nic's but it's actual a blade with 2 LOM's (lan on motherboard) with
> each one port. Via VC we present max 4 FlexNic's per port, but for
> this server we present 2 FlexNic's per port.
>
> The fun with Linux is that it always sees all FlexNic's devices even
> if we configure 2 FlexNics via a VC profile on a port like on this
> server.
>
> Michal
I see. This seems to be a valid VC configuration and therefore the
message should be reduced to debug level all together. At least we
resolved a 4 port configuration problem...
Eilon
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] bnx2x: downgrade Max BW error message to debug
2011-08-16 12:45 ` Eilon Greenstein
@ 2011-08-17 15:50 ` Michal Schmidt
2011-08-17 17:44 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-17 15:50 UTC (permalink / raw)
To: eilong; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
There are valid configurations where Max BW is configured to zero for
some VNs.
Print the message only if debugging is enabled and do not call the
configuration "illegal".
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 223bfee..8245e02 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1481,8 +1481,7 @@ static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
FUNC_MF_CFG_MAX_BW_SHIFT;
if (!max_cfg) {
- BNX2X_ERR("Illegal configuration detected for Max BW - "
- "using 100 instead\n");
+ BNX2X_DBG_ERR("Max BW configured to 0 - using 100 instead\n");
max_cfg = 100;
}
return max_cfg;
--
1.7.6
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
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
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-17 17:44 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Wed, 2011-08-17 at 08:50 -0700, Michal Schmidt wrote:
> There are valid configurations where Max BW is configured to zero for
> some VNs.
> Print the message only if debugging is enabled and do not call the
> configuration "illegal".
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
>
> ---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> index 223bfee..8245e02 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> @@ -1481,8 +1481,7 @@ static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
> u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
> FUNC_MF_CFG_MAX_BW_SHIFT;
> if (!max_cfg) {
> - BNX2X_ERR("Illegal configuration detected for Max BW - "
> - "using 100 instead\n");
> + BNX2X_DBG_ERR("Max BW configured to 0 - using 100 instead\n");
I think that we should use DP instead of DBG_ERR. How about this one:
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 223bfee..70dc7bc 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1481,8 +1481,7 @@ static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
FUNC_MF_CFG_MAX_BW_SHIFT;
if (!max_cfg) {
- BNX2X_ERR("Illegal configuration detected for Max BW - "
- "using 100 instead\n");
+ DP(NETIF_MSG_LINK, "Max BW configured to 0 - using 100 instead\n");
max_cfg = 100;
}
return max_cfg;
Can you sing-off on somethign like this?
Thanks,
Eilon
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
2011-08-17 17:44 ` Eilon Greenstein
@ 2011-08-18 11:37 ` Michal Schmidt
2011-08-18 12:22 ` Eilon Greenstein
0 siblings, 1 reply; 13+ messages in thread
From: Michal Schmidt @ 2011-08-18 11:37 UTC (permalink / raw)
To: eilong; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Wed, 17 Aug 2011 20:44:15 +0300 Eilon Greenstein wrote:
> I think that we should use DP instead of DBG_ERR. How about this one:
...
> Can you sing-off on somethign like this?
OK, let's use DP. Thanks!
Subject: [PATCH v2] bnx2x: downgrade Max BW error message to debug
There are valid configurations where Max BW is configured to zero for
some VNs.
Print the message only if debugging is enabled and do not call the
configuration "illegal".
[v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 223bfee..9059aef 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1481,8 +1481,8 @@ static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
FUNC_MF_CFG_MAX_BW_SHIFT;
if (!max_cfg) {
- BNX2X_ERR("Illegal configuration detected for Max BW - "
- "using 100 instead\n");
+ DP(NETIF_MSG_LINK,
+ "Max BW configured to 0 - using 100 instead\n");
max_cfg = 100;
}
return max_cfg;
--
1.7.6
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
2011-08-18 11:37 ` Michal Schmidt
@ 2011-08-18 12:22 ` Eilon Greenstein
2011-08-19 4:51 ` David Miller
0 siblings, 1 reply; 13+ messages in thread
From: Eilon Greenstein @ 2011-08-18 12:22 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Dmitry Kravkov, Vladislav Zolotarov
On Thu, 2011-08-18 at 04:37 -0700, Michal Schmidt wrote:
> On Wed, 17 Aug 2011 20:44:15 +0300 Eilon Greenstein wrote:
> > I think that we should use DP instead of DBG_ERR. How about this one:
> ...
> > Can you sing-off on somethign like this?
>
> OK, let's use DP. Thanks!
>
>
> Subject: [PATCH v2] bnx2x: downgrade Max BW error message to debug
>
> There are valid configurations where Max BW is configured to zero for
> some VNs.
> Print the message only if debugging is enabled and do not call the
> configuration "illegal".
>
> [v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Thanks Michal!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
2011-08-18 12:22 ` Eilon Greenstein
@ 2011-08-19 4:51 ` David Miller
0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2011-08-19 4:51 UTC (permalink / raw)
To: eilong; +Cc: mschmidt, netdev, dmitry, vladz
From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Thu, 18 Aug 2011 15:22:00 +0300
> On Thu, 2011-08-18 at 04:37 -0700, Michal Schmidt wrote:
>> On Wed, 17 Aug 2011 20:44:15 +0300 Eilon Greenstein wrote:
>> > I think that we should use DP instead of DBG_ERR. How about this one:
>> ...
>> > Can you sing-off on somethign like this?
>>
>> OK, let's use DP. Thanks!
>>
>>
>> Subject: [PATCH v2] bnx2x: downgrade Max BW error message to debug
>>
>> There are valid configurations where Max BW is configured to zero for
>> some VNs.
>> Print the message only if debugging is enabled and do not call the
>> configuration "illegal".
>>
>> [v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]
>>
>> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
>
> Acked-by: Eilon Greenstein <eilong@broadcom.com>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-19 4:51 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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.