From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
jdike@addtoit.com, richard@nod.at,
anton.ivanov@cambridgegreys.com, johannes.berg@intel.com,
linux-um@lists.infradead.org
Subject: [PATCH net-next 2/3] net: um: use eth_hw_addr_set()
Date: Thu, 28 Oct 2021 19:47:06 -0700 [thread overview]
Message-ID: <20211029024707.316066-3-kuba@kernel.org> (raw)
In-Reply-To: <20211029024707.316066-1-kuba@kernel.org>
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
next prev parent reply other threads:[~2021-10-29 2:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 2:47 [PATCH net-next 0/3] arch, misc: use eth_hw_addr_set() Jakub Kicinski
2021-10-29 2:47 ` [PATCH net-next 1/3] net: sgi-xp: " Jakub Kicinski
2021-10-29 15:57 ` Steve Wahl
2021-10-29 2:47 ` Jakub Kicinski [this message]
2021-10-29 6:37 ` [PATCH net-next 2/3] net: um: " Anton Ivanov
2021-10-29 2:47 ` [PATCH net-next 3/3] net: xtensa: " Jakub Kicinski
2021-10-29 12:30 ` [PATCH net-next 0/3] arch, misc: " 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=20211029024707.316066-3-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=davem@davemloft.net \
--cc=jdike@addtoit.com \
--cc=johannes.berg@intel.com \
--cc=linux-um@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=richard@nod.at \
/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).