[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06b5b9c2-38d8-2767-8b6e-1d23c88f397e@intel.com>
Date: Fri, 9 Jun 2023 19:11:29 +0200
From: Piotr Gardocki <piotrx.gardocki@...el.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
CC: <netdev@...r.kernel.org>, <przemyslaw.kitszel@...el.com>,
<michal.swiatkowski@...ux.intel.com>, <pmenzel@...gen.mpg.de>,
<kuba@...nel.org>, <anthony.l.nguyen@...el.com>, <simon.horman@...igine.com>,
<aleksander.lobakin@...el.com>
Subject: Re: [PATCH net-next] net: add check for current MAC address in
dev_set_mac_address
On 09.06.2023 19:00, Maciej Fijalkowski wrote:
> On Fri, Jun 09, 2023 at 06:52:41PM +0200, Piotr Gardocki wrote:
>> @@ -8820,6 +8820,8 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
>> return -EINVAL;
>> if (!netif_device_present(dev))
>> return -ENODEV;
>> + if (ether_addr_equal(dev->dev_addr, sa->sa_data))
>> + return 0;
>
> Now this check being in makes calls to ether_addr_equal() within driver's
> ndo callbacks redundant.
>
> I would rather see this as patchset send directly to netdev where you have
> this patch followed by addressing driver's callbacks.
Sure, will do :)
I will remove this check in all drivers in drivers/net/ethernet/intel/,
I don't have time to review all usages of this callback in kernel,
there are too many of them. Will resend as a patchset next week.
> Moar commitz == moar glory ;)
>
>> err = dev_pre_changeaddr_notify(dev, sa->sa_data, extack);
>> if (err)
>> return err;
>> --
>> 2.34.1
>>
Powered by blists - more mailing lists