[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08b11944-984f-eeeb-4b03-777faaa3ce01@intel.com>
Date: Tue, 13 Jun 2023 17:24:11 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Piotr Gardocki <piotrx.gardocki@...el.com>, <netdev@...r.kernel.org>
CC: <pmenzel@...gen.mpg.de>, <simon.horman@...igine.com>,
<anthony.l.nguyen@...el.com>, <kuba@...nel.org>,
<intel-wired-lan@...ts.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next v2 3/3] ice: remove unnecessary
check for old MAC == new MAC
On 6/13/23 17:16, Piotr Gardocki wrote:
> On 13.06.2023 17:10, Przemek Kitszel wrote:
> [...]
>>>
>>> I would expect one patch that adds check in the core, then one patch that removes it in all, incl non-intel, drivers; with CC to their respective maintainers (like Tony for intel, ./scripts/get_maintainer.pl will help)
>>
>> I have checked, it's almost 200 handlers, which amounts to over 3500 lines of code (short-cutting analysis on eth_hw_addr_set()), what probably could warrant more than one patch/person to spread the work
>>
>> anybody willing to see the above code-to-look-at, or wants to re-run it for their directory of interests, here is dirty bash script (which just approximates what's to be done, but rather closely to reality):
>>
>> grep -InrE '\.'ndo_set_mac_address'\s+=' |
>> awk '!/NULL/ {gsub(/,$/, ""); print $NF}' |
>> sort -u |
>> xargs -I% bash -c 'grep -ERwIl %'"'"'\(struct net_device.+\)$'"'"' |
>> xargs -I @ awk '"'"'/%\(struct net_device.+\)$/, /^}|eth_hw_addr_set\(/ { print "@:" NR $0 }'"'"' @' |
>> cat -n
>>
>> @Piotr, perhaps resolve all intel drivers in your series?
>
> Thanks for script, looks impressive :). Someone might really
> use it to detect all occurrences. As you said there are a lot
> of callbacks in kernel, so unfortunately I can't fix all of them.
> I fixed it for drivers/net/ethernet/intel directory,
> only i40e and ice had these checks. If you want me to check any
> other intel directory or if I missed something here, please let
> me know.
there is ether_addr_equal() call in iavf_set_mac(), even if not exactly
before eth_hw_addr_set(), it still should be removed ;)
Anyway, I would fix all 3 drivers with one patch.
Powered by blists - more mailing lists