From: Hangbin Liu <liuhangbin@gmail.com>
To: Jay Vosburgh <jv@jvosburgh.net>
Cc: netdev@vger.kernel.org, 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>,
Nikolay Aleksandrov <razor@blackwall.org>,
Simon Horman <horms@kernel.org>, Cosmin Ratiu <cratiu@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2 net] bonding: use permanent address for MAC swapping if device address is same
Date: Fri, 18 Apr 2025 07:39:24 +0000 [thread overview]
Message-ID: <aAIBrKIWltiXw_av@fedora> (raw)
In-Reply-To: <155385.1744949793@famine>
On Thu, Apr 17, 2025 at 09:16:33PM -0700, Jay Vosburgh wrote:
> >Hmm, then how about use bond_for_each_slave() and find out the link
> >that has same MAC address with bond/new_slave?
>
> But even if we find it, aren't we stuck at that point? The
> situation would be that the bond and one backup interface have MAC#1.
> MAC#1 may or may not be that backup interface's permanent MAC address,
> and we're adding another interface, also with MAC#1, which might be the
> newly added interface's permanent MAC. The MAC swap gyrations to
> guarantee this would work correctly in all cases seem to be rather
> involved.
>
> Wouldn't it be equally effective to, when the conflicting
> interface is added, give it a random MAC to avoid the conflict? That
> random MAC shouldn't end up as the bond's MAC, so it would exist only as
> a placeholder of sorts.
This looks good to me. Thanks for your suggestion.
Regards
Hangbin
>
> I'm unsure if there are many (any?) devices in common use today
> that actually have issues with multiple ports using the same MAC, so I
> don't think we need an overly complicated solution.
>
> -J
>
> ---
> -Jay Vosburgh, jv@jvosburgh.net
next prev parent reply other threads:[~2025-04-18 7:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 9:06 [PATCHv2 net] bonding: use permanent address for MAC swapping if device address is same Hangbin Liu
2025-04-04 21:36 ` Jay Vosburgh
2025-04-07 9:34 ` Hangbin Liu
2025-04-14 6:06 ` Hangbin Liu
2025-04-16 1:15 ` Jay Vosburgh
2025-04-16 2:52 ` Hangbin Liu
2025-04-18 4:16 ` Jay Vosburgh
2025-04-18 7:39 ` Hangbin Liu [this message]
2025-04-21 4:24 ` Hangbin Liu
2025-04-21 5:10 ` Jay Vosburgh
2025-04-21 6:11 ` Hangbin Liu
2025-04-23 16:27 ` Jay Vosburgh
2025-04-24 3:22 ` Hangbin Liu
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=aAIBrKIWltiXw_av@fedora \
--to=liuhangbin@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.