All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, mareklindner@neomailbox.ch,
	b.a.t.m.a.n@lists.open-mesh.org, a@unstable.cc
Subject: Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
Date: Tue, 19 Oct 2021 21:17:19 +0200	[thread overview]
Message-ID: <7316475.UB4K6AP8Nz@sven-desktop> (raw)
In-Reply-To: <20211019120654.6dee21b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Tuesday, 19 October 2021 21:06:54 CEST Jakub Kicinski wrote:
> On Tue, 19 Oct 2021 09:39:27 -0700 Jakub Kicinski wrote:
> > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> > of VLANs...") introduced a rbtree for faster Ethernet address look
> > up. To maintain netdev->dev_addr in this tree we need to make all
> > the writes to it got through appropriate helpers.
> > 
> > Convert batman from ether_addr_copy() to eth_hw_addr_set():
> > 
> >   @@
> >   expression dev, np;
> >   @@
> >   - ether_addr_copy(dev->dev_addr, np)
> >   + eth_hw_addr_set(dev, np)
> > 
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> Extending CC list.

Acked-by: Sven Eckelmann <sven@narfation.org>

> > diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
> > index 0604b0279573..7ee09337fc40 100644
> > --- a/net/batman-adv/soft-interface.c
> > +++ b/net/batman-adv/soft-interface.c
> > @@ -134,7 +134,7 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p)
> >  		return -EADDRNOTAVAIL;
> >  
> >  	ether_addr_copy(old_addr, dev->dev_addr);
> > -	ether_addr_copy(dev->dev_addr, addr->sa_data);
> > +	eth_hw_addr_set(dev, addr->sa_data);
> >  
> >  	/* only modify transtable if it has been initialized before */
> >  	if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
> 
> 


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Sven Eckelmann <sven@narfation.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, mareklindner@neomailbox.ch,
	b.a.t.m.a.n@lists.open-mesh.org, a@unstable.cc,
	sw@simonwunderlich.de
Subject: Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
Date: Tue, 19 Oct 2021 21:17:19 +0200	[thread overview]
Message-ID: <7316475.UB4K6AP8Nz@sven-desktop> (raw)
In-Reply-To: <20211019120654.6dee21b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Tuesday, 19 October 2021 21:06:54 CEST Jakub Kicinski wrote:
> On Tue, 19 Oct 2021 09:39:27 -0700 Jakub Kicinski wrote:
> > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> > of VLANs...") introduced a rbtree for faster Ethernet address look
> > up. To maintain netdev->dev_addr in this tree we need to make all
> > the writes to it got through appropriate helpers.
> > 
> > Convert batman from ether_addr_copy() to eth_hw_addr_set():
> > 
> >   @@
> >   expression dev, np;
> >   @@
> >   - ether_addr_copy(dev->dev_addr, np)
> >   + eth_hw_addr_set(dev, np)
> > 
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> Extending CC list.

Acked-by: Sven Eckelmann <sven@narfation.org>

> > diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
> > index 0604b0279573..7ee09337fc40 100644
> > --- a/net/batman-adv/soft-interface.c
> > +++ b/net/batman-adv/soft-interface.c
> > @@ -134,7 +134,7 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p)
> >  		return -EADDRNOTAVAIL;
> >  
> >  	ether_addr_copy(old_addr, dev->dev_addr);
> > -	ether_addr_copy(dev->dev_addr, addr->sa_data);
> > +	eth_hw_addr_set(dev, addr->sa_data);
> >  
> >  	/* only modify transtable if it has been initialized before */
> >  	if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
> 
> 


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-10-19 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 16:39 [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy() Jakub Kicinski
2021-10-19 19:06 ` Jakub Kicinski
2021-10-19 19:17   ` Sven Eckelmann [this message]
2021-10-19 19:17     ` Sven Eckelmann
2021-10-20 13:30 ` patchwork-bot+netdevbpf

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=7316475.UB4K6AP8Nz@sven-desktop \
    --to=sven@narfation.org \
    --cc=a@unstable.cc \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=kuba@kernel.org \
    --cc=mareklindner@neomailbox.ch \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.