The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev-bot+sinfo@kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] bonding: roll back fail_over_mac if enslave fails
Date: Thu, 3 Dec 2026 09:40:39 +0800	[thread overview]
Message-ID: <axDIJYh7OVeBqfQl@fedora> (raw)
In-Reply-To: <7b2988d2-732c-4de2-8f54-8e6ecb08ef3b@redhat.com>

Hi Paolo,
On Wed, Dec 02, 2026 at 10:35:53AM +0100, Paolo Abeni wrote:
> On 11/24/26 13:38, netdev-bot+sinfo@kernel.org wrote:
> > Hi!
> > 
> > This is an automated message. This series looks like a fix, but its
> > commit messages seem to be missing some information:
> > 
> >   - How the issue was discovered, e.g. hit in production, hit during
> >     development, syzbot report, manual code inspection, LLM or static
> >     analysis tool scan.
> > 
> >   - Whether the issue was actually triggered, or is only theoretical
> >     (e.g. found by LLM and not proven at runtime). If it was triggered
> >     please include the symptoms, like the stack trace or kernel messages.
> > 
> > Please do not repost the series just to address the above. Instead,
> > reply to this email with the missing information, so that reviewers
> > can take it into account.
> > 
> > *IMPORTANT*: If you do repost (for other reasons) - please include
> > the relevant info in the cover letter or commit messages.
> 
> Please answer the above questions.

Oh, I thought this is only for fixes to net.

The issue is discovered when I tried to restruct bond_enslave().
It could be reproduced via

bash-5.3# ip link add wg0 type wireguard
bash-5.3# ip link add bond0 type bond mode active-backup
bash-5.3# ip link set bond0 xdpdrv obj xdp_dummy.bpf.o sec xdp
bash-5.3# ip -d -j -p link show bond0 | grep fail_over_mac
                "fail_over_mac": "none",
bash-5.3# ip link set wg0 master bond0
Error: Slave does not support XDP.
bash-5.3# ip -d -j -p link show bond0 | grep fail_over_mac
                "fail_over_mac": "active",


After the patch, the fail_over_mac will not be changed by a failed enslave.

bash-5.3# ip -d -j -p link show bond0 | grep fail_over_mac
                "fail_over_mac": "none",

> Also any changes to have this scenario covered by self-tests?

We generally try our best to avoid failures during enslavement, since we have
a lot of rollback work to handle. The reproducer for these bond_enslave
rollback paths relies on XDP checking failures. I’ve moved that XDP check
earlier in bond_enslave with the patch:
"bonding: check XDP support before enslaving changes state" [1].

Once that XDP patch is applied, this class of issue will become difficult
to reproduce. Therefore, I do not plan to add a selftest for it.

[1] https://lore.kernel.org/all/20261130-bond_xdp_fix-v3-1-49be5fcd9376@kylinos.cn/

Thanks
Hangbin

  reply	other threads:[~2026-12-03  1:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 12:34 [PATCH net-next] bonding: roll back fail_over_mac if enslave fails Hangbin Liu
2026-11-24 12:38 ` netdev-bot+sinfo
2026-12-02  9:35   ` Paolo Abeni
2026-12-03  1:40     ` Hangbin Liu [this message]
2026-11-30 11:28 ` Daniel Machon
2026-12-03  2:02 ` willemb

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=axDIJYh7OVeBqfQl@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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