mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: hangbin.liu@linux.dev
Cc: jv@jvosburgh.net, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	tonghao@bamaicloud.com, razor@blackwall.org, shuah@kernel.org,
	jiangjiehua1@huawei.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode"
Date: Fri, 27 Nov 2026 03:15:55 +0000	[thread overview]
Message-ID: <179574935536.3135.14725054266290783008@kernel.org> (raw)
In-Reply-To: <20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Commit trailer and tagging problems on the revert.
- [Low] Comments no longer match how broadcast mode uses usable_slaves.

--

Revert "bonding: do not set usable_slaves for broadcast mode"

This reverts commit 45fc134bcfad. That commit stopped publishing
bond->usable_slaves in broadcast mode, so updelay was no longer ignored
when there were no active slaves. A follow-up patch in the series
rebuilds the slave array on link changes for broadcast mode.

> Revert "bonding: do not set usable_slaves for broadcast mode"
>
> This reverts commit 45fc134bcfadde456639c1b1e206e6918d69a553.

[ ... ]

>     Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>

[Severity: Low]
The From: address is Hangbin Liu <hangbin.liu@linux.dev>, but the
Signed-off-by: address is Hangbin Liu <liuhangbin@kylinos.cn>. Checkpatch
reports this as FROM_SIGN_OFF_MISMATCH. The other two patches in the series
have the same mismatch.

Should this revert carry a Fixes: tag, or a stable dependency note?

Commit 45fc134bcfad went in through net with its own Fixes: e0caeb24f538,
so it has probably reached stable. The follow-up "bonding: update slave
array on link change for broadcast mode" has Fixes: e0caeb24f538 and says
it needs this revert first. None of the tags tell stable tooling about
that ordering.

If only the follow-up is backported, it has no effect. The
bond_set_slave_arr() from 45fc134bcfad still drops usable_slaves for
broadcast mode.

If only this revert is backported, the bug that 45fc134bcfad fixed comes
back: in broadcast mode the stale, empty usable_slaves array makes the
bond always ignore updelay.

> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 042d7c75548fa..d6675e87d06b6 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -5140,18 +5140,13 @@ static void bond_set_slave_arr(struct bonding *bond,
>  {
>  	struct bond_up_slave *usable, *all;
>
> -	all = rtnl_dereference(bond->all_slaves);
> -	rcu_assign_pointer(bond->all_slaves, all_slaves);
> -	kfree_rcu(all, rcu);
> -
> -	if (BOND_MODE(bond) == BOND_MODE_BROADCAST) {
> -		kfree_rcu(usable_slaves, rcu);
> -		return;
> -	}
> -
>  	usable = rtnl_dereference(bond->usable_slaves);
>  	rcu_assign_pointer(bond->usable_slaves, usable_slaves);
>  	kfree_rcu(usable, rcu);

[Severity: Low]
This isn't a bug, but after this revert bond->usable_slaves is published
for BOND_MODE_BROADCAST too. Should the related comments in bond_main.c be
updated to match?

The comment above bond_update_slave_arr() still lists only the xmit-hash
modes:

drivers/net/bonding/bond_main.c:
/* Build the usable slaves array in control path for modes that use xmit-hash
 * to determine the slave interface -
 * (a) BOND_MODE_8023AD
 * (b) BOND_MODE_XOR
 * (c) (BOND_MODE_TLB || BOND_MODE_ALB) && tlb_dynamic_lb == 0

The call site in bond_enslave() explains the broadcast case only in terms
of all_slaves:

	/* broadcast mode uses the all_slaves to loop through slaves. */
	if (bond_mode_can_use_xmit_hash(bond) ||
	    BOND_MODE(bond) == BOND_MODE_BROADCAST)
		bond_update_slave_arr(bond, NULL);

However, bond_miimon_inspect() now relies on the broadcast-mode
usable_slaves to decide ignore_updelay:

		usable_slaves = rcu_dereference(bond->usable_slaves);

		if (usable_slaves && usable_slaves->count == 0)
			ignore_updelay = true;

The rest of the series does not change either comment. Neither comment
says that broadcast mode must keep usable_slaves current on link changes,
which the follow-up patch makes a requirement.

> +
> +	all = rtnl_dereference(bond->all_slaves);
> +	rcu_assign_pointer(bond->all_slaves, all_slaves);
> +	kfree_rcu(all, rcu);
>  }

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126-bond_broadcast_updelay-v1-0-188e5538d6ca%40kylinos.cn

  reply	other threads:[~2026-11-27  3:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  2:30 [PATCH net 0/3] bonding: ignore updelay when no active links for broadcast mode Hangbin Liu
2026-11-26  2:30 ` [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode" Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko [this message]
2026-11-26  2:30 ` [PATCH net 2/3] bonding: update slave array on link change for broadcast mode Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko
2026-11-27  6:00     ` Hangbin Liu
2026-11-26  2:30 ` [PATCH net 3/3] selftests: bonding: add recovery updelay test " Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko
2026-11-26  2:32 ` [PATCH net 0/3] bonding: ignore updelay when no active links " netdev-bot+sinfo
2026-11-26  7:28 ` jiangjiehua (A)

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=179574935536.3135.14725054266290783008@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hangbin.liu@linux.dev \
    --cc=jiangjiehua1@huawei.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=tonghao@bamaicloud.com \
    /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

all inboxes | Powered by JetHome®