From f58ad6989dfe16d84d3dfa6b79310e91125bb504 Mon Sep 17 00:00:00 2001 From: Denis Kirjanov Date: Feb 14 2024 12:13:15 +0000 Subject: net: bonding: debug: avoid printing debug logs when bond is not notifying peers (git-fixes). --- diff --git a/patches.suse/net-bonding-debug-avoid-printing-debug-logs-when-bon.patch b/patches.suse/net-bonding-debug-avoid-printing-debug-logs-when-bon.patch new file mode 100644 index 0000000..3d733d9 --- /dev/null +++ b/patches.suse/net-bonding-debug-avoid-printing-debug-logs-when-bon.patch @@ -0,0 +1,68 @@ +From 16867fd810e0383198bd5d460c7106477354c109 Mon Sep 17 00:00:00 2001 +From: Suresh Kumar +Date: Mon, 13 Dec 2021 11:17:09 +0530 +Subject: [PATCH 1/5] net: bonding: debug: avoid printing debug logs when bond + is not notifying peers +Git-commit: fee32de284ac277ba434a2d59f8ce46528ff3946 +References: git-fixes +Patch-mainline: v5.17-rc1 + +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 +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + 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 023f15b4b205..76daa4e6b45e 100644 +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -782,14 +782,14 @@ 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 || + !netif_carrier_ok(bond->dev) || + 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.16.4 + diff --git a/series.conf b/series.conf index 2d2698f..6f34ea4 100644 --- a/series.conf +++ b/series.conf @@ -62715,6 +62715,7 @@ patches.suse/Bluetooth-bfusb-fix-division-by-zero-in-send-path.patch patches.suse/msft-hv-2486-net-mana-Add-XDP-support.patch patches.suse/wcn36xx-ensure-pairing-of-init_scan-finish_scan-and-.patch + patches.suse/net-bonding-debug-avoid-printing-debug-logs-when-bon.patch patches.suse/ibmvnic-Update-driver-return-codes.patch patches.suse/gve-Correct-order-of-processing-device-options.patch patches.suse/gve-Move-the-irq-db-indexes-out-of-the-ntfy-block-st.patch