* [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
@ 2021-10-19 16:39 Jakub Kicinski
2021-10-19 19:06 ` Jakub Kicinski
2021-10-20 13:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2021-10-19 16:39 UTC (permalink / raw)
To: netdev; +Cc: Jakub Kicinski
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>
---
net/batman-adv/soft-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
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
2021-10-20 13:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2021-10-19 19:06 UTC (permalink / raw)
To: sven; +Cc: netdev, mareklindner, b.a.t.m.a.n, a, sw
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.
> 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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
2021-10-19 19:06 ` Jakub Kicinski
@ 2021-10-19 19:17 ` Sven Eckelmann
0 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2021-10-19 19:17 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, mareklindner, b.a.t.m.a.n, a, sw
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
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-20 13:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-20 13:30 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 19 Oct 2021 09:39:27 -0700 you 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():
>
> [...]
Here is the summary with links:
- batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()
https://git.kernel.org/netdev/net-next/c/0f00e70ef645
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-20 13:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-10-20 13:30 ` patchwork-bot+netdevbpf
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).