Patch "net: bonding: debug: avoid printing debug logs when bond is not notifying peers" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: bonding: debug: avoid printing debug logs when bond is not notifying peers

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-bonding-debug-avoid-printing-debug-logs-when-bon.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8aba859d18d8f3f3d24f67ee24360c166d5a4698
Author: Suresh Kumar <surkumar@xxxxxxxxxx>
Date:   Mon Dec 13 11:17:09 2021 +0530

    net: bonding: debug: avoid printing debug logs when bond is not notifying peers
    
    [ Upstream commit fee32de284ac277ba434a2d59f8ce46528ff3946 ]
    
    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@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 645c7cabcbe4d..e2e6a69adab4b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1061,9 +1061,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 ||
@@ -1071,6 +1068,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;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux