[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429621.1719446760@famine>
Date: Wed, 26 Jun 2024 17:06:00 -0700
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: Jakub Kicinski <kuba@...nel.org>
cc: Hangbin Liu <liuhangbin@...il.com>, netdev@...r.kernel.org,
Andy Gospodarek <andy@...yhouse.net>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...nulli.us>,
Amit Cohen <amcohen@...dia.com>,
Nikolay Aleksandrov <razor@...ckwall.org>
Subject: Re: [PATCHv3 net-next] bonding: 3ad: send ifinfo notify when mux
state changed
Jakub Kicinski <kuba@...nel.org> wrote:
>On Wed, 26 Jun 2024 15:51:56 +0800 Hangbin Liu wrote:
>> 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.
>
>Hits:
>
>RTNL: assertion failed at net/core/rtnetlink.c (1823)
>
>On two selftests. Please run the selftests on a debug kernel..
Oh, I forgot about needing RTNL.
We cannot simply acquire RTNL in ad_mux_machine(), as the
bond->mode_lock is already held, and the lock ordering must be RTNL
first, then mode_lock, lest we deadlock.
Hangbin, I'd suggest you look at how bond_netdev_notify_work()
complies with the lock ordering (basically, doing the actual work out of
line in a workqueue event), or how the "should_notify" flag is used in
bond_3ad_state_machine_handler(). The first is more complicated, but
won't skip events; the second may miss intermediate state transitions if
it cannot acquire RTNL and has to delay the notification.
-J
---
-Jay Vosburgh, jay.vosburgh@...onical.com
Powered by blists - more mailing lists