* [PATCH] net: bonding: debug: avoid printing debug logs when bond is not notifying peers
@ 2021-12-13 5:47 Suresh Kumar
2021-12-13 15:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Suresh Kumar @ 2021-12-13 5:47 UTC (permalink / raw)
To: j.vosburgh, vfalico, andy, davem, kuba, netdev, linux-kernel; +Cc: Suresh Kumar
Currently "bond_should_notify_peers: slave ..." messages are printed whenever
"bond_should_notify_peers" function is called.
+++
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Received LACPDU on port 1
Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Rx Machine: Port=1, Last State=6, Curr State=6
Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): partner sync=1
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
...
Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Received LACPDU on port 2
Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Rx Machine: Port=2, Last State=6, Curr State=6
Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): partner sync=1
Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
+++
This is confusing and can also clutter up debug logs.
Print logs only when the peer notification happens.
Signed-off-by: Suresh Kumar <suresh2514@gmail.com>
---
drivers/net/bonding/bond_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ff8da720a33a..0ac964359fbf 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1096,9 +1096,6 @@ static bool bond_should_notify_peers(struct bonding *bond)
slave = rcu_dereference(bond->curr_active_slave);
rcu_read_unlock();
- netdev_dbg(bond->dev, "bond_should_notify_peers: slave %s\n",
- slave ? slave->dev->name : "NULL");
-
if (!slave || !bond->send_peer_notif ||
bond->send_peer_notif %
max(1, bond->params.peer_notif_delay) != 0 ||
@@ -1106,6 +1103,9 @@ static bool bond_should_notify_peers(struct bonding *bond)
test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state))
return false;
+ netdev_dbg(bond->dev, "bond_should_notify_peers: slave %s\n",
+ slave ? slave->dev->name : "NULL");
+
return true;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: bonding: debug: avoid printing debug logs when bond is not notifying peers
2021-12-13 5:47 [PATCH] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Suresh Kumar
@ 2021-12-13 15:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-13 15:00 UTC (permalink / raw)
To: Suresh Kumar
Cc: j.vosburgh, vfalico, andy, davem, kuba, netdev, linux-kernel, suresh2514
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 13 Dec 2021 11:17:09 +0530 you wrote:
> Currently "bond_should_notify_peers: slave ..." messages are printed whenever
> "bond_should_notify_peers" function is called.
>
> +++
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Received LACPDU on port 1
> Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Rx Machine: Port=1, Last State=6, Curr State=6
> Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): partner sync=1
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> ...
> Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Received LACPDU on port 2
> Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Rx Machine: Port=2, Last State=6, Curr State=6
> Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): partner sync=1
> Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25
> +++
>
> [...]
Here is the summary with links:
- net: bonding: debug: avoid printing debug logs when bond is not notifying peers
https://git.kernel.org/netdev/net-next/c/fee32de284ac
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] 2+ messages in thread
end of thread, other threads:[~2021-12-13 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 5:47 [PATCH] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Suresh Kumar
2021-12-13 15:00 ` 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).