Subject: Re: [PATCHv2 net] bonding: use permanent address for MAC swapping if device address is same

From: Jay Vosburgh <[email-masked]>
Date: Sun, 20 Apr 2025 22:10:24 -0700

Hangbin Liu <[email-masked]> wrote:

>Hi Jay,
>
>On Thu, Apr 17, 2025 at 09:16:33PM -0700, Jay Vosburgh wrote:
>> 	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.
>> 
>> 	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.
>
>I'm not familiar with infiniband devices. Can we use eth_random_addr()
>to set random addr for infiniband devices? And what about other device
>type? Just return error directly?

	Infiniband devices have fixed MAC addresses that cannot be
changed.  Bonding permits IB devices only in active-backup mode, and
will set fail_over_mac to active (fail_over_mac=follow is not permitted
for IB).

	I don't understand your questions about other device types or
errors, could you elaborate?

	-J

---
	-Jay Vosburgh, [email-masked]