netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Piotr Gardocki <piotrx.gardocki@intel.com>, <netdev@vger.kernel.org>
Cc: <pmenzel@molgen.mpg.de>, <simon.horman@corigine.com>,
	<anthony.l.nguyen@intel.com>, <kuba@kernel.org>,
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next v2 3/3] ice: remove unnecessary check for old MAC == new MAC
Date: Tue, 13 Jun 2023 17:24:11 +0200	[thread overview]
Message-ID: <08b11944-984f-eeeb-4b03-777faaa3ce01@intel.com> (raw)
In-Reply-To: <837ccaeb-a77d-5570-1363-e5e344528f97@intel.com>

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.

  reply	other threads:[~2023-06-13 15:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 12:24 [PATCH net-next v2 0/3] optimize procedure of changing MAC address on interface Piotr Gardocki
2023-06-13 12:24 ` [PATCH net-next v2 1/3] net: add check for current MAC address in dev_set_mac_address Piotr Gardocki
2023-06-13 13:10   ` Maciej Fijalkowski
2023-06-13 13:23     ` Paul Menzel
2023-06-13 13:25       ` Fijalkowski, Maciej
2023-06-20  7:16   ` Gal Pressman
2023-06-20 10:29     ` Piotr Gardocki
2023-06-20 10:42       ` Gal Pressman
2023-06-20 15:59         ` Jakub Kicinski
2023-06-20 16:23           ` Piotr Gardocki
2023-06-20 16:25           ` Gal Pressman
2023-06-13 12:24 ` [PATCH net-next v2 2/3] i40e: remove unnecessary check for old MAC == new MAC Piotr Gardocki
2023-06-13 13:11   ` Maciej Fijalkowski
2023-06-13 12:24 ` [PATCH net-next v2 3/3] ice: " Piotr Gardocki
2023-06-13 13:13   ` Maciej Fijalkowski
2023-06-13 14:02   ` Przemek Kitszel
2023-06-13 15:10     ` [Intel-wired-lan] " Przemek Kitszel
2023-06-13 15:16       ` Piotr Gardocki
2023-06-13 15:24         ` Przemek Kitszel [this message]
2023-06-13 15:32           ` Piotr Gardocki
2023-06-13 18:24             ` Jakub Kicinski

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=08b11944-984f-eeeb-4b03-777faaa3ce01@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=piotrx.gardocki@intel.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=simon.horman@corigine.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).