netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
@ 2024-01-25 13:41 Breno Leitao
  2024-01-25 14:33 ` Pavan Chebbi
  2024-01-26 22:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 7+ messages in thread
From: Breno Leitao @ 2024-01-25 13:41 UTC (permalink / raw)
  To: pavan.chebbi, Michael Chan, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran
  Cc: gospo, open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER,
	open list

commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
changed a netdev_err() to netdev_WARN_ONCE().

netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for
the following reasons:

 * You do not a kernel warning if the firmware queries are late
 * In busy networks, timestamp query failures fairly regularly
 * A WARNING message doesn't bring much value, since the code path
is clear.
(This was discussed in-depth in [1])

Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a
more well-behaved message, instead of a full WARN().

	bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5

[1] Link: https://lore.kernel.org/all/ZbDj%2FFI4EJezcfd1@gmail.com/
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
index adad188e38b8..cc07660330f5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
@@ -684,7 +684,7 @@ static void bnxt_stamp_tx_skb(struct bnxt *bp, struct sk_buff *skb)
 		timestamp.hwtstamp = ns_to_ktime(ns);
 		skb_tstamp_tx(ptp->tx_skb, &timestamp);
 	} else {
-		netdev_WARN_ONCE(bp->dev,
+		netdev_warn_once(bp->dev,
 				 "TS query for TX timer failed rc = %x\n", rc);
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 13:41 [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent Breno Leitao
@ 2024-01-25 14:33 ` Pavan Chebbi
  2024-01-25 14:53   ` Breno Leitao
  2024-01-26 22:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 7+ messages in thread
From: Pavan Chebbi @ 2024-01-25 14:33 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Michael Chan, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Richard Cochran, gospo,
	open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER, open list

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

On Thu, Jan 25, 2024 at 7:11 PM Breno Leitao <leitao@debian.org> wrote:
>
> commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
> changed a netdev_err() to netdev_WARN_ONCE().
>
> netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for
> the following reasons:
>
>  * You do not a kernel warning if the firmware queries are late
>  * In busy networks, timestamp query failures fairly regularly
>  * A WARNING message doesn't bring much value, since the code path
> is clear.
> (This was discussed in-depth in [1])
>
> Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a
> more well-behaved message, instead of a full WARN().
>
>         bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5
>
> [1] Link: https://lore.kernel.org/all/ZbDj%2FFI4EJezcfd1@gmail.com/
> Signed-off-by: Breno Leitao <leitao@debian.org>

LGTM, however, you may still need to add a proper fixes tag.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 14:33 ` Pavan Chebbi
@ 2024-01-25 14:53   ` Breno Leitao
  2024-01-25 15:21     ` Pavan Chebbi
  0 siblings, 1 reply; 7+ messages in thread
From: Breno Leitao @ 2024-01-25 14:53 UTC (permalink / raw)
  To: Pavan Chebbi
  Cc: Michael Chan, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Richard Cochran, gospo,
	open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER, open list

On Thu, Jan 25, 2024 at 08:03:18PM +0530, Pavan Chebbi wrote:
> On Thu, Jan 25, 2024 at 7:11 PM Breno Leitao <leitao@debian.org> wrote:
> >
> > commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
> > changed a netdev_err() to netdev_WARN_ONCE().
> >
> > netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for
> > the following reasons:
> >
> >  * You do not a kernel warning if the firmware queries are late
> >  * In busy networks, timestamp query failures fairly regularly
> >  * A WARNING message doesn't bring much value, since the code path
> > is clear.
> > (This was discussed in-depth in [1])
> >
> > Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a
> > more well-behaved message, instead of a full WARN().
> >
> >         bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5
> >
> > [1] Link: https://lore.kernel.org/all/ZbDj%2FFI4EJezcfd1@gmail.com/
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> 
> LGTM, however, you may still need to add a proper fixes tag.

Thanks. I didn't include a fix tag because it is not a fix per se, but,
I can easily send a v2 if this is needed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 14:53   ` Breno Leitao
@ 2024-01-25 15:21     ` Pavan Chebbi
  2024-01-25 17:44       ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Pavan Chebbi @ 2024-01-25 15:21 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Michael Chan, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Richard Cochran, gospo,
	open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER, open list

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

On Thu, Jan 25, 2024 at 8:23 PM Breno Leitao <leitao@debian.org> wrote:
>
> On Thu, Jan 25, 2024 at 08:03:18PM +0530, Pavan Chebbi wrote:
> > On Thu, Jan 25, 2024 at 7:11 PM Breno Leitao <leitao@debian.org> wrote:
> > >
> > > commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
> > > changed a netdev_err() to netdev_WARN_ONCE().
> > >
> > > netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for
> > > the following reasons:
> > >
> > >  * You do not a kernel warning if the firmware queries are late
> > >  * In busy networks, timestamp query failures fairly regularly
> > >  * A WARNING message doesn't bring much value, since the code path
> > > is clear.
> > > (This was discussed in-depth in [1])
> > >
> > > Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a
> > > more well-behaved message, instead of a full WARN().
> > >
> > >         bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5
> > >
> > > [1] Link: https://lore.kernel.org/all/ZbDj%2FFI4EJezcfd1@gmail.com/
> > > Signed-off-by: Breno Leitao <leitao@debian.org>
> >
> > LGTM, however, you may still need to add a proper fixes tag.
>
> Thanks. I didn't include a fix tag because it is not a fix per se, but,
> I can easily send a v2 if this is needed.

You have a point. But then in that case it should go to net-next, I think.
If you respin or otherwise,
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 15:21     ` Pavan Chebbi
@ 2024-01-25 17:44       ` Jakub Kicinski
  2024-01-25 17:58         ` Michael Chan
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2024-01-25 17:44 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Pavan Chebbi, Michael Chan, David S. Miller, Eric Dumazet,
	Paolo Abeni, Richard Cochran, gospo,
	open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER, open list

On Thu, 25 Jan 2024 20:51:25 +0530 Pavan Chebbi wrote:
> > > LGTM, however, you may still need to add a proper fixes tag.  
> >
> > Thanks. I didn't include a fix tag because it is not a fix per se, but,
> > I can easily send a v2 if this is needed.  

We should pick it as a fix. If we put it in net-next and someone
complains cherry-picking it into net would be a PITA. And we shouldn't
spew WARN()s about known-to-be-occurring conditions, GregKH is pretty
clear about that.

If you can post the Fixes tag in a reply our apply scripts should pick
it up automatically. Or at least mine will :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 17:44       ` Jakub Kicinski
@ 2024-01-25 17:58         ` Michael Chan
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Chan @ 2024-01-25 17:58 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Breno Leitao, Pavan Chebbi, David S. Miller, Eric Dumazet,
	Paolo Abeni, Richard Cochran, gospo,
	open list:BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER, open list

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

On Thu, Jan 25, 2024 at 9:44 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 25 Jan 2024 20:51:25 +0530 Pavan Chebbi wrote:
> > > > LGTM, however, you may still need to add a proper fixes tag.
> > >
> > > Thanks. I didn't include a fix tag because it is not a fix per se, but,
> > > I can easily send a v2 if this is needed.
>
> We should pick it as a fix. If we put it in net-next and someone
> complains cherry-picking it into net would be a PITA. And we shouldn't
> spew WARN()s about known-to-be-occurring conditions, GregKH is pretty
> clear about that.
>
> If you can post the Fixes tag in a reply our apply scripts should pick
> it up automatically. Or at least mine will :)

Fixes: 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
Reviewed-by: Michael Chan <michael.chan@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent
  2024-01-25 13:41 [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent Breno Leitao
  2024-01-25 14:33 ` Pavan Chebbi
@ 2024-01-26 22:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-26 22:10 UTC (permalink / raw)
  To: Breno Leitao
  Cc: pavan.chebbi, michael.chan, davem, edumazet, kuba, pabeni,
	richardcochran, gospo, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 25 Jan 2024 05:41:03 -0800 you wrote:
> commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent")
> changed a netdev_err() to netdev_WARN_ONCE().
> 
> netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for
> the following reasons:
> 
>  * You do not a kernel warning if the firmware queries are late
>  * In busy networks, timestamp query failures fairly regularly
>  * A WARNING message doesn't bring much value, since the code path
> is clear.
> (This was discussed in-depth in [1])
> 
> [...]

Here is the summary with links:
  - [net] bnxt_en: Make PTP timestamp HWRM more silent
    https://git.kernel.org/netdev/net/c/281cb9d65a95

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-26 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 13:41 [PATCH net] bnxt_en: Make PTP timestamp HWRM more silent Breno Leitao
2024-01-25 14:33 ` Pavan Chebbi
2024-01-25 14:53   ` Breno Leitao
2024-01-25 15:21     ` Pavan Chebbi
2024-01-25 17:44       ` Jakub Kicinski
2024-01-25 17:58         ` Michael Chan
2024-01-26 22:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).