From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
robinmholt@gmail.com, steve.wahl@hpe.com, mike.travis@hpe.com,
arnd@arndb.de, gregkh@linuxfoundation.org
Subject: [PATCH net-next 1/3] net: sgi-xp: use eth_hw_addr_set()
Date: Thu, 28 Oct 2021 19:47:05 -0700 [thread overview]
Message-ID: <20211029024707.316066-2-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: robinmholt@gmail.com
CC: steve.wahl@hpe.com
CC: mike.travis@hpe.com
CC: arnd@arndb.de
CC: gregkh@linuxfoundation.org
---
drivers/misc/sgi-xp/xpnet.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index 2508f83bdc3f..dab7b92db790 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -514,6 +514,7 @@ static const struct net_device_ops xpnet_netdev_ops = {
static int __init
xpnet_init(void)
{
+ u8 addr[ETH_ALEN];
int result;
if (!is_uv_system())
@@ -545,15 +546,17 @@ xpnet_init(void)
xpnet_device->min_mtu = XPNET_MIN_MTU;
xpnet_device->max_mtu = XPNET_MAX_MTU;
+ memset(addr, 0, sizeof(addr));
/*
* Multicast assumes the LSB of the first octet is set for multicast
* MAC addresses. We chose the first octet of the MAC to be unlikely
* to collide with any vendor's officially issued MAC.
*/
- xpnet_device->dev_addr[0] = 0x02; /* locally administered, no OUI */
+ addr[0] = 0x02; /* locally administered, no OUI */
- xpnet_device->dev_addr[XPNET_PARTID_OCTET + 1] = xp_partition_id;
- xpnet_device->dev_addr[XPNET_PARTID_OCTET + 0] = (xp_partition_id >> 8);
+ addr[XPNET_PARTID_OCTET + 1] = xp_partition_id;
+ addr[XPNET_PARTID_OCTET + 0] = (xp_partition_id >> 8);
+ eth_hw_addr_set(xpnet_device, addr);
/*
* ether_setup() sets this to a multicast device. We are
--
2.31.1
next prev parent reply other threads:[~2021-10-29 2:47 UTC|newest]
Thread overview: 9+ 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 ` Jakub Kicinski [this message]
2021-10-29 15:57 ` [PATCH net-next 1/3] net: sgi-xp: " Steve Wahl
2021-10-29 2:47 ` [PATCH net-next 2/3] net: um: " Jakub Kicinski
2021-10-29 2:47 ` Jakub Kicinski
2021-10-29 6:37 ` Anton Ivanov
2021-10-29 6:37 ` 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-2-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=mike.travis@hpe.com \
--cc=netdev@vger.kernel.org \
--cc=robinmholt@gmail.com \
--cc=steve.wahl@hpe.com \
/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.