From: Salvatore Bonaccorso <carnil@debian.org>
To: Ian MacDonald <ian@netstatz.com>, 1121032@bugs.debian.org
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Bug#1121032: net: thunderbolt: missing ndo_set_mac_address breaks 802.3ad bonding
Date: Wed, 26 Nov 2025 09:16:36 +0100 [thread overview]
Message-ID: <aSa3ZLvb_swDO5mQ@eldamar.lan> (raw)
In-Reply-To: <CAFJzfF8aQ8KsOXTg6oaOa_Zayx=bPZtsat2h_osn8r4wyT2wOw@mail.gmail.com>
Hi Ian,
On Fri, Nov 21, 2025 at 11:50:14AM -0500, Ian MacDonald wrote:
> On Fri, Nov 21, 2025 at 1:08 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > Okay "breaks" is probably too strong word here. It was never even supported
> > :)
> Agreed, let's say the "magic fades". I am guessing the same magic
> that allows this 0x8086 component to appear out of thin air.
> thunderbolt 0-2: new host found, vendor=0x8086 device=0x1
> >
> > Can you describe what are the actual commands you run so I can try to
> > setup on my side and see how this could be implemented?
>
> Sure, first the working variant for active-backup.
>
> One side shown in netplan using a single yaml file (Ubuntu 24.04 server)
>
> root@ai2:~# networkctl status bond0
> ● 3: bond0
> Link File: /usr/lib/systemd/network/99-default.link
> Network File: /run/systemd/network/10-netplan-bond0.network
> State: routable (configured)
> Online state: online
> Type: bond
> Kind: bond
> Driver: bonding
> Hardware Address: 02:92:d5:a7:f4:79
> MTU: 1500 (min: 68, max: 65535)
> QDisc: noqueue
> IPv6 Address Generation Mode: eui64
> Mode: active-backup
> Miimon: 500ms
> Updelay: 0
> Downdelay: 0
> Number of Queues (Tx/Rx): 16/16
> Auto negotiation: no
> Address: 10.10.13.2
> fe80::92:d5ff:fea7:f479
> Activation Policy: up
> Required For Online: yes
> DHCP6 Client DUID: DUID-EN/Vendor:0000ab11ccb509966215f387
>
> Nov 21 16:10:03 ai2 systemd-networkd[720]: bond0: netdev ready
> Nov 21 16:10:03 ai2 systemd-networkd[720]: bond0: Configuring with
> /run/systemd/network/10-netplan-bond0.network.
> Nov 21 16:10:03 ai2 systemd-networkd[720]: bond0: Link UP
> Nov 21 16:10:08 ai2 systemd-networkd[720]: bond0: Gained carrier
> Nov 21 16:10:09 ai2 systemd-networkd[720]: bond0: Gained IPv6LL
>
> root@ai2:~# cat /etc/netplan/60-bonded-init.yaml
> network:
> version: 2
> renderer: networkd
>
> ethernets:
> thunderbolt0:
> dhcp4: false
>
> thunderbolt1:
> dhcp4: false
>
> bonds:
> bond0:
> interfaces: [thunderbolt0, thunderbolt1]
> dhcp4: false
> addresses: [10.10.13.2/30]
> parameters:
> mode: active-backup
> mii-monitor-interval: 500
>
> The other side using a 3 file systemd-networkd variant (using on Debian 13)
>
> ai4:/etc/systemd/network# networkctl status bond0
> ● 3: bond0
> NetDev File: /etc/systemd/network/50-bond0.netdev
> Link File: /usr/lib/systemd/network/99-default.link
> Network File: /etc/systemd/network/53-bond0.network
> State: routable (configured)
> Online state: online
> Type: bond
> Kind: bond
> Driver: bonding
> Hardware Address: 02:0f:03:70:86:fb
> MTU: 1500 (min: 68, max: 65535)
> QDisc: noqueue
> IPv6 Address Generation Mode: eui64
> Mode: active-backup
> Miimon: 500ms
> Updelay: 0
> Downdelay: 0
> Number of Queues (Tx/Rx): 16/16
> Auto negotiation: no
> Address: 10.10.13.1
> fe80::f:3ff:fe70:86fb
> Activation Policy: up
> Required For Online: yes
> DHCPv6 Client DUID: DUID-EN/Vendor:0000ab112f49d10231f668bf
>
> Nov 21 11:21:55 ai4 systemd-networkd[700]: bond0: netdev ready
> Nov 21 11:21:55 ai4 systemd-networkd[700]: bond0: Configuring with
> /etc/systemd/network/53-bond0.network.
> Nov 21 11:21:55 ai4 systemd-networkd[700]: bond0: Link UP
> Nov 21 11:22:01 ai4 systemd-networkd[700]: bond0: Gained carrier
> Nov 21 11:22:02 ai4 systemd-networkd[700]: bond0: Gained IPv6LL
>
> ai4:/etc/systemd/network# cat 50-bond0.netdev
> # /etc/systemd/network/50-bond0.netdev
> [NetDev]
> Name=bond0
> Kind=bond
>
> [Bond]
> MIIMonitorSec=0.5s
> Mode=active-backup
> FailOverMACPolicy=none
>
> ai4:/etc/systemd/network# cat 52-thunderbolt-bond0-slaves.network
> # /etc/systemd/network/52-thunderbolt-bond0-slaves.network
> [Match]
> Name=thunderbolt0 thunderbolt1
>
> [Network]
> Bond=bond0
>
> ai4:/etc/systemd/network# cat 53-bond0.network
> # /etc/systemd/network/53-bond0.network
> [Match]
> Name=bond0
>
> [Network]
> Address=10.10.13.1/30
>
> Changing the mode to LACP/802.3ad then results in the observed mac
> setting issues.
>
> systemd-networkd/Debian Side:
>
> ai4:/etc/systemd/network# cat 50-bond0.netdev
> # /etc/systemd/network/50-bond0.netdev
> [NetDev]
> Name=bond0
> Kind=bond
>
> [Bond]
> MIIMonitorSec=0.5s
> Mode=802.3ad
> TransmitHashPolicy=layer3+4
>
> and the netplan/Ubuntu Side:
>
> root@ai2:/etc/netplan# cat 60-bonded-init.yaml
> network:
> version: 2
> renderer: networkd
>
> ethernets:
> thunderbolt0:
> dhcp4: false
>
> thunderbolt1:
> dhcp4: false
>
> bonds:
> bond0:
> interfaces: [thunderbolt0, thunderbolt1]
> dhcp4: false
> addresses: [10.10.13.2/30]
> parameters:
> mode: 802.3ad
> transmit-hash-policy: layer3+4
> mii-monitor-interval: 500
>
> I typically reboot to apply the changes, to avoid some gaps in just
> doing a netplan generate/apply or systemd-networkd restart, which do
> not change the mode dynamically, as might be expected.
>
> On Fri, Nov 21, 2025 at 3:11 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> >
> > Okay since the MAC address is not really being used in the USB4NET protocol
> > it should be fine to allow it to be changed.
> >
> > The below allows me to change it using "ip link set" command. I wonder if
> > you could try it with the bonding case and see it that makes any
> > difference?
> >
> > diff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c
> > index dcaa62377808..57b226afeb84 100644
> > --- a/drivers/net/thunderbolt/main.c
> > +++ b/drivers/net/thunderbolt/main.c
> > @@ -1261,6 +1261,7 @@ static const struct net_device_ops tbnet_netdev_ops = {
> > .ndo_open = tbnet_open,
> > .ndo_stop = tbnet_stop,
> > .ndo_start_xmit = tbnet_start_xmit,
> > + .ndo_set_mac_address = eth_mac_addr,
> > .ndo_get_stats64 = tbnet_get_stats64,
> > };
> >
> > @@ -1281,6 +1282,9 @@ static void tbnet_generate_mac(struct net_device *dev)
> > hash = jhash2((u32 *)xd->local_uuid, 4, hash);
> > addr[5] = hash & 0xff;
> > eth_hw_addr_set(dev, addr);
> > +
> > + /* Allow changing it if needed */
> > + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
> > }
> >
> > static int tbnet_probe(struct tb_service *svc, const struct tb_service_id *id)
>
> Sure, I can give this a shot this weekend
Where you able to test the proposed change?
Regards,
Salvatore
next prev parent reply other threads:[~2025-11-26 8:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 20:59 net: thunderbolt: missing ndo_set_mac_address breaks 802.3ad bonding Ian MacDonald
2025-11-21 6:08 ` Mika Westerberg
2025-11-21 8:11 ` Mika Westerberg
2025-11-21 16:50 ` Ian MacDonald
2025-11-26 8:16 ` Salvatore Bonaccorso [this message]
2025-11-26 23:39 ` Ian MacDonald
2025-11-27 5:33 ` Mika Westerberg
2025-11-27 18:59 ` Andrew Lunn
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=aSa3ZLvb_swDO5mQ@eldamar.lan \
--to=carnil@debian.org \
--cc=1121032@bugs.debian.org \
--cc=YehezkelShB@gmail.com \
--cc=ian@netstatz.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=westeri@kernel.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;
as well as URLs for NNTP newsgroup(s).