Subject: Re: [PATCH net-next v2 1/3] net: add check for current MAC address in dev_set_mac_address

From: Gal Pressman <[email-masked]>
Date: Tue, 20 Jun 2023 19:25:20 +0300

On 20/06/2023 18:59, Jakub Kicinski wrote:
> On Tue, 20 Jun 2023 13:42:14 +0300 Gal Pressman wrote:
>>> I checked it, you're right. When the addr_assign_type is PERM or RANDOM
>>> and user or some driver sets the same MAC address the type doesn't change
>>> to NET_ADDR_SET. In my testing I didn't notice issues with that, but I'm
>>> sure there are cases I didn't cover. Did you discover any useful cases
>>> that broke after this patch or did you just notice it in code?  
>>
>> This behavior change was caught in our regression tests.
> 
> Why was the regression test written this way?

This test environment is quite good at detecting state/behavior changes.

The test isn't written in any specific way, AFAIU we hit this patch flow
by default when using bonding (bond takes the first slave MAC address
and then sets the same address to all slaves?), it's not a test that
tries to set the same MAC address explicitly.