* [PATCH net-next 2/3] net: um: use eth_hw_addr_set()
[not found] <20211029024707.316066-1-kuba@kernel.org>
@ 2021-10-29 2:47 ` Jakub Kicinski
2021-10-29 6:37 ` Anton Ivanov
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2021-10-29 2:47 UTC (permalink / raw)
To: davem
Cc: netdev, Jakub Kicinski, jdike, richard, anton.ivanov,
johannes.berg, linux-um
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 go through appropriate helpers.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: jdike@addtoit.com
CC: richard@nod.at
CC: anton.ivanov@cambridgegreys.com
CC: johannes.berg@intel.com
CC: linux-um@lists.infradead.org
---
arch/um/drivers/net_kern.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 2fc0b038ff8a..59331384c2d3 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -276,7 +276,7 @@ static const struct ethtool_ops uml_net_ethtool_ops = {
void uml_net_setup_etheraddr(struct net_device *dev, char *str)
{
- unsigned char *addr = dev->dev_addr;
+ u8 addr[ETH_ALEN];
char *end;
int i;
@@ -316,6 +316,7 @@ void uml_net_setup_etheraddr(struct net_device *dev, char *str)
addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4],
addr[5]);
}
+ eth_hw_addr_set(dev, addr);
return;
random:
--
2.31.1
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 2/3] net: um: use eth_hw_addr_set()
2021-10-29 2:47 ` [PATCH net-next 2/3] net: um: use eth_hw_addr_set() Jakub Kicinski
@ 2021-10-29 6:37 ` Anton Ivanov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Ivanov @ 2021-10-29 6:37 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, jdike, richard, johannes.berg, linux-um
On 29/10/2021 03:47, 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 go through appropriate helpers.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: jdike@addtoit.com
> CC: richard@nod.at
> CC: anton.ivanov@cambridgegreys.com
> CC: johannes.berg@intel.com
> CC: linux-um@lists.infradead.org
> ---
> arch/um/drivers/net_kern.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> index 2fc0b038ff8a..59331384c2d3 100644
> --- a/arch/um/drivers/net_kern.c
> +++ b/arch/um/drivers/net_kern.c
> @@ -276,7 +276,7 @@ static const struct ethtool_ops uml_net_ethtool_ops = {
>
> void uml_net_setup_etheraddr(struct net_device *dev, char *str)
> {
> - unsigned char *addr = dev->dev_addr;
> + u8 addr[ETH_ALEN];
> char *end;
> int i;
>
> @@ -316,6 +316,7 @@ void uml_net_setup_etheraddr(struct net_device *dev, char *str)
> addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4],
> addr[5]);
> }
> + eth_hw_addr_set(dev, addr);
> return;
>
> random:
>
Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-29 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211029024707.316066-1-kuba@kernel.org>
2021-10-29 2:47 ` [PATCH net-next 2/3] net: um: use eth_hw_addr_set() Jakub Kicinski
2021-10-29 6:37 ` Anton Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox