From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Hangbin Liu <liuhangbin@gmail.com>,
netdev@vger.kernel.org, Andy Gospodarek <andy@greyhouse.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Ido Schimmel <idosch@nvidia.com>,
Jiri Pirko <jiri@resnulli.us>, Amit Cohen <amcohen@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: Re: [PATCHv3 net-next] bonding: 3ad: send ifinfo notify when mux state changed
Date: Wed, 26 Jun 2024 17:06:00 -0700 [thread overview]
Message-ID: <1429621.1719446760@famine> (raw)
In-Reply-To: <20240626145355.5db060ad@kernel.org>
Jakub Kicinski <kuba@kernel.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@canonical.com
next prev parent reply other threads:[~2024-06-27 0:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 7:51 [PATCHv3 net-next] bonding: 3ad: send ifinfo notify when mux state changed Hangbin Liu
2024-06-26 8:22 ` Nikolay Aleksandrov
2024-06-26 15:30 ` Jay Vosburgh
2024-06-26 21:53 ` Jakub Kicinski
2024-06-27 0:06 ` Jay Vosburgh [this message]
2024-06-27 8:26 ` Hangbin Liu
2024-06-27 8:29 ` Nikolay Aleksandrov
2024-06-27 10:05 ` Hangbin Liu
2024-06-27 10:33 ` Nikolay Aleksandrov
2024-06-27 13:17 ` Hangbin Liu
2024-06-27 14:12 ` Nikolay Aleksandrov
2024-06-27 14:24 ` Jay Vosburgh
2024-06-28 3:10 ` Hangbin Liu
2024-06-28 7:04 ` Nikolay Aleksandrov
2024-06-28 7:22 ` Nikolay Aleksandrov
2024-06-28 9:55 ` Hangbin Liu
2024-06-28 23:36 ` Jay Vosburgh
2024-07-02 8:00 ` Hangbin Liu
2024-07-11 3:12 ` Hangbin Liu
2024-07-19 6:45 ` Hangbin Liu
2024-07-29 7:43 ` Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429621.1719446760@famine \
--to=jay.vosburgh@canonical.com \
--cc=amcohen@nvidia.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.