[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240625070057.2004129-1-liuhangbin@gmail.com>
Date: Tue, 25 Jun 2024 15:00:57 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Jay Vosburgh <j.vosburgh@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCHv2 net-next] bonding: 3ad: send ifinfo notify when mux state changed
Currently, administrators need to retrieve LACP mux state changes from
the kernel DEBUG log using netdev_dbg and slave_dbg macros. To simplify
this process, let's send the ifinfo notification whenever the mux state
changes. This will enable users to directly access and monitor this
information using the ip monitor command.
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
v2: don't use call_netdevice_notifiers as it will case sleeping in atomic
context (Nikolay Aleksandrov)
---
drivers/net/bonding/bond_3ad.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index c6807e473ab7..7a7224bf1894 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1185,6 +1185,8 @@ static void ad_mux_machine(struct port *port, bool *update_slave_arr)
default:
break;
}
+
+ rtmsg_ifinfo(RTM_NEWLINK, port->slave->dev, 0, GFP_KERNEL, 0, NULL);
}
}
--
2.45.0
Powered by blists - more mailing lists