From: Hangbin Liu <liuhangbin@gmail.com>
To: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] bonding: only set speed/duplex to unknown, if getting speed failed
Date: Tue, 3 Feb 2026 03:24:09 +0000 [thread overview]
Message-ID: <aYFqWcyuuN8V71LX@fedora> (raw)
In-Reply-To: <20260202151726.36abe1d0@samweis>
On Mon, Feb 02, 2026 at 03:17:26PM +0100, Thomas Bogendoerfer wrote:
> On Fri, 30 Jan 2026 12:36:19 +0000
> Hangbin Liu <liuhangbin@gmail.com> wrote:
>
> > On Fri, Jan 30, 2026 at 12:19:04PM +0100, Thomas Bogendoerfer wrote:
> > > bond_update_speed_duplex() first set speed/duplex to unknown and
> > > then asks slave driver for current speed/duplex. Since getting
> > > speed/duplex might take longer there is a race, where this false state
> > > is visible by /proc/net/bonding. With commit 691b2bf14946 ("bonding:
> >
> > The patch looks good to me. But based on your description, I don't think
> > the fixes tag is correct.
>
> the race is old, but it got visible by that commit. Before
> bond_update_speed_duplex() was only called on enslaving and when bond
> is brought up. Now it could also be called during normal operation and
> that's what caught attention by customers.
>
> I'm fine changing the fixes tag to whatever we agree to. So which should
> I take ?
Maybe
98f41f694f46 ("bonding:update speed/duplex for NETDEV_CHANGE") and
589665f5a600 ("bonding: comparing a u8 with -1 is always false")?
The 98f41f694f46 set speed/duplex to -1 by default, which could cause the race
to show SPEED_UNKNOWN. But (slave->duplex == -1) checking is always false, so
no possible to show DUPLEX_UNKNOWN. The 589665f5a600 fixed this issue, after
that speed/duplex both could be shown as UNKNOWN.
Thanks
Hangbin
next prev parent reply other threads:[~2026-02-03 3:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 11:19 [PATCH net] bonding: only set speed/duplex to unknown, if getting speed failed Thomas Bogendoerfer
2026-01-30 12:36 ` Hangbin Liu
2026-01-30 15:38 ` Jay Vosburgh
2026-01-30 16:07 ` Nikolay Aleksandrov
2026-02-02 14:17 ` Thomas Bogendoerfer
2026-02-03 3:24 ` Hangbin Liu [this message]
2026-02-03 14:08 ` Thomas Bogendoerfer
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=aYFqWcyuuN8V71LX@fedora \
--to=liuhangbin@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tbogendoerfer@suse.de \
/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.