From: Jay Vosburgh <jv@jvosburgh.net>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Hangbin Liu <hangbin.liu@linux.dev>, luyun <luyun_611@163.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, maheshb@google.com, razor@blackwall.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net v3] bonding: 3ad: select a port when the TX array is empty
Date: Sat, 24 Oct 2026 14:44:09 -0500 [thread overview]
Message-ID: <65061.1792871049@vermin> (raw)
In-Reply-To: <0d32d785-d16a-456d-98e5-8e952d09ab76@redhat.com>
Paolo Abeni <pabeni@redhat.com> wrote:
>On 10/12/26 11:52, Hangbin Liu wrote:
>> On Mon, Oct 12, 2026 at 03:20:09PM +0800, luyun wrote:
>>> On cost: the fallback only runs when the array is empty, so the normal
>>> transmit path is untouched. Inside the window it is a lockless RCU list
>>> walk with no new state; the second pass and the broadcast branch are
>>> there to keep the array path's hash mapping and broadcast_neighbor
>>> semantics.
>>>
>>> I would also like Jay's feedback on the preferred direction. If a
>>> control-path solution is preferred, I am open to working on separating
>>> array preparation from port enablement, as long as it does not change
>>> LACP convergence behavior.
>> +1
>I guess we are not getting Jay's feedback anytime soon.
Apologies for not responding sooner, I've been traveling and
missed this discussion when catching up.
>I think a control-plane solution is highly preferable, even if it's
>going to be a more significant work. I have just skimmed over the code
>and it feels like removing the rtnl lock requirement for
>bond_update_slave_arr() is doable - i.e. moving ->all_slaves and
>->usable_slaves under a new bond specific mutex).
Reading the patch and subsequent discussion, I tend to agree
with this. In addition to what's been stated previously, the fallback
method has the disadvantage that it adds a test and branch to the
transmit path that will be taken very rarely.
As I recall, bond_update_slave_arr requires RTNL only to prevent
anything else from altering the set of interfaces in the bond while it
runs. It doesn't need to actually made interface-level changes or send
notifications, so, I think that as long as the bond_enslave /
__bond_release_one paths synchronize with the bond_update_slave_arr, it
should be safe without RTNL. Using RTNL for this was originally easy,
as the enslave / release paths always have RTNL held.
Having a mechanism to provide a lighter weight "don't change the
bond's list of interfaces" knob might also permit removing or at least
narrowing the scope of some of the other RTNL-related weirdness in other
places.
All of the "rtnl_trylock run in a work queue" patterns are hacks
to avoid deadlocks, and if we can change any of those to be synchronous
and deterministic while removing a trylock that's a good thing in my
mind.
-J
---
-Jay Vosburgh, jv@jvosburgh.net
next prev parent reply other threads:[~2026-10-24 19:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 2:40 [PATCH net v3] bonding: 3ad: select a port when the TX array is empty Yun Lu
2026-10-10 9:43 ` Hangbin Liu
2026-10-12 7:20 ` luyun
2026-10-12 9:52 ` Hangbin Liu
2026-10-20 7:06 ` Paolo Abeni
2026-10-24 19:44 ` Jay Vosburgh [this message]
2026-10-26 7:26 ` luyun
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=65061.1792871049@vermin \
--to=jv@jvosburgh.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hangbin.liu@linux.dev \
--cc=kuba@kernel.org \
--cc=luyun_611@163.com \
--cc=maheshb@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox