mbox series

[net-next,v3,0/3] optimize procedure of changing MAC address on interface

Message ID 20230614145302.902301-1-piotrx.gardocki@intel.com (mailing list archive)
Headers show
Series optimize procedure of changing MAC address on interface | expand

Message

Piotr Gardocki June 14, 2023, 2:52 p.m. UTC
The first patch adds an if statement in core to skip early when
the MAC address is not being changes.
The remaining patches remove such checks from Intel drivers
as they're redundant at this point.

v3: removed "This patch ..." from first patch to simplify sentence.
v2: modified check in core to support addresses of any length,
removed redundant checks in i40e and ice

Piotr Gardocki (3):
  net: add check for current MAC address in dev_set_mac_address
  i40e: remove unnecessary check for old MAC == new MAC
  ice: remove unnecessary check for old MAC == new MAC

 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ------
 drivers/net/ethernet/intel/ice/ice_main.c   | 5 -----
 net/core/dev.c                              | 2 ++
 3 files changed, 2 insertions(+), 11 deletions(-)

Comments

Maciej Fijalkowski June 14, 2023, 3:50 p.m. UTC | #1
On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
> The first patch adds an if statement in core to skip early when
> the MAC address is not being changes.
> The remaining patches remove such checks from Intel drivers
> as they're redundant at this point.
> 
> v3: removed "This patch ..." from first patch to simplify sentence.
> v2: modified check in core to support addresses of any length,
> removed redundant checks in i40e and ice

Any particular reason for not including my rev-by tags on driver patches?

> 
> Piotr Gardocki (3):
>   net: add check for current MAC address in dev_set_mac_address
>   i40e: remove unnecessary check for old MAC == new MAC
>   ice: remove unnecessary check for old MAC == new MAC
> 
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ------
>  drivers/net/ethernet/intel/ice/ice_main.c   | 5 -----
>  net/core/dev.c                              | 2 ++
>  3 files changed, 2 insertions(+), 11 deletions(-)
> 
> -- 
> 2.34.1
>
Piotr Gardocki June 14, 2023, 3:52 p.m. UTC | #2
On 14.06.2023 17:50, Maciej Fijalkowski wrote:
> On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
>> The first patch adds an if statement in core to skip early when
>> the MAC address is not being changes.
>> The remaining patches remove such checks from Intel drivers
>> as they're redundant at this point.
>>
>> v3: removed "This patch ..." from first patch to simplify sentence.
>> v2: modified check in core to support addresses of any length,
>> removed redundant checks in i40e and ice
> 
> Any particular reason for not including my rev-by tags on driver patches?

No, I just forgot I can include them when I'm not changing the entire
patch set. I'm sorry :(
Maciej Fijalkowski June 14, 2023, 3:53 p.m. UTC | #3
On Wed, Jun 14, 2023 at 05:52:17PM +0200, Piotr Gardocki wrote:
> On 14.06.2023 17:50, Maciej Fijalkowski wrote:
> > On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
> >> The first patch adds an if statement in core to skip early when
> >> the MAC address is not being changes.
> >> The remaining patches remove such checks from Intel drivers
> >> as they're redundant at this point.
> >>
> >> v3: removed "This patch ..." from first patch to simplify sentence.
> >> v2: modified check in core to support addresses of any length,
> >> removed redundant checks in i40e and ice
> > 
> > Any particular reason for not including my rev-by tags on driver patches?
> 
> No, I just forgot I can include them when I'm not changing the entire
> patch set. I'm sorry :(

No worries, I think we can ask Jakub to include them if he thinks current
state of this work is fine.
Simon Horman June 15, 2023, 7:31 a.m. UTC | #4
On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
> The first patch adds an if statement in core to skip early when
> the MAC address is not being changes.
> The remaining patches remove such checks from Intel drivers
> as they're redundant at this point.

Hi Pitor,

I am wondering if you audited other drivers to see if they
could also be updated in a similar way to the Intel changes
in this patch-set.
Piotr Gardocki June 15, 2023, 8:51 a.m. UTC | #5
On 15.06.2023 09:31, Simon Horman wrote:
> On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
>> The first patch adds an if statement in core to skip early when
>> the MAC address is not being changes.
>> The remaining patches remove such checks from Intel drivers
>> as they're redundant at this point.
> 
> Hi Pitor,
> 
> I am wondering if you audited other drivers to see if they
> could also be updated in a similar way to the Intel changes
> in this patch-set.

Hi Simon,

We already discussed this in "[PATCH net-next v2 3/3]". Other drivers
should be audited at one point, but there are hundreds of ndo_set_mac_address
callbacks in kernel and I don't have resources to review all of them. I just
fixed Intel drivers for now.
When this patch set is applied someone else can work on that.
Simon Horman June 15, 2023, 11:31 a.m. UTC | #6
On Thu, Jun 15, 2023 at 10:51:28AM +0200, Piotr Gardocki wrote:
> On 15.06.2023 09:31, Simon Horman wrote:
> > On Wed, Jun 14, 2023 at 04:52:59PM +0200, Piotr Gardocki wrote:
> >> The first patch adds an if statement in core to skip early when
> >> the MAC address is not being changes.
> >> The remaining patches remove such checks from Intel drivers
> >> as they're redundant at this point.
> > 
> > Hi Pitor,
> > 
> > I am wondering if you audited other drivers to see if they
> > could also be updated in a similar way to the Intel changes
> > in this patch-set.
> 
> Hi Simon,
> 
> We already discussed this in "[PATCH net-next v2 3/3]". Other drivers
> should be audited at one point, but there are hundreds of ndo_set_mac_address
> callbacks in kernel and I don't have resources to review all of them. I just
> fixed Intel drivers for now.
> When this patch set is applied someone else can work on that.

Sorry, I forgot about that discussion.
Of course this is fine.
patchwork-bot+netdevbpf@kernel.org June 16, 2023, 6 a.m. UTC | #7
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 14 Jun 2023 16:52:59 +0200 you wrote:
> The first patch adds an if statement in core to skip early when
> the MAC address is not being changes.
> The remaining patches remove such checks from Intel drivers
> as they're redundant at this point.
> 
> v3: removed "This patch ..." from first patch to simplify sentence.
> v2: modified check in core to support addresses of any length,
> removed redundant checks in i40e and ice
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/3] net: add check for current MAC address in dev_set_mac_address
    https://git.kernel.org/netdev/net-next/c/ad72c4a06acc
  - [net-next,v3,2/3] i40e: remove unnecessary check for old MAC == new MAC
    https://git.kernel.org/netdev/net-next/c/c45a6d1a23c5
  - [net-next,v3,3/3] ice: remove unnecessary check for old MAC == new MAC
    https://git.kernel.org/netdev/net-next/c/96868cca7971

You are awesome, thank you!
Maciej Fijalkowski June 16, 2023, 10:02 a.m. UTC | #8
> 
> Hello:
> 
> This series was applied to netdev/net-next.git (main)
> by Jakub Kicinski <kuba@kernel.org>:
> 
> On Wed, 14 Jun 2023 16:52:59 +0200 you wrote:
> > The first patch adds an if statement in core to skip early when
> > the MAC address is not being changes.
> > The remaining patches remove such checks from Intel drivers
> > as they're redundant at this point.
> >
> > v3: removed "This patch ..." from first patch to simplify sentence.
> > v2: modified check in core to support addresses of any length,
> > removed redundant checks in i40e and ice
> >
> > [...]
> 
> Here is the summary with links:
>   - [net-next,v3,1/3] net: add check for current MAC address in dev_set_mac_address
>     https://git.kernel.org/netdev/net-next/c/ad72c4a06acc
>   - [net-next,v3,2/3] i40e: remove unnecessary check for old MAC == new MAC
>     https://git.kernel.org/netdev/net-next/c/c45a6d1a23c5
>   - [net-next,v3,3/3] ice: remove unnecessary check for old MAC == new MAC
>     https://git.kernel.org/netdev/net-next/c/96868cca7971

Ah, so next time I will respond to each revision with rev-by tags 
Jakub Kicinski June 16, 2023, 3:29 p.m. UTC | #9
On Fri, 16 Jun 2023 10:02:12 +0000 Fijalkowski, Maciej wrote:
> > Here is the summary with links:
> >   - [net-next,v3,1/3] net: add check for current MAC address in dev_set_mac_address
> >     https://git.kernel.org/netdev/net-next/c/ad72c4a06acc
> >   - [net-next,v3,2/3] i40e: remove unnecessary check for old MAC == new MAC
> >     https://git.kernel.org/netdev/net-next/c/c45a6d1a23c5
> >   - [net-next,v3,3/3] ice: remove unnecessary check for old MAC == new MAC
> >     https://git.kernel.org/netdev/net-next/c/96868cca7971  
> 
> Ah, so next time I will respond to each revision with rev-by tags