From: netdev-bot+sashiko@kernel.org
To: dong100@mucse.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
yaojun@mucse.com
Subject: Re: [PATCH net-next 4/5] net: rnpgbe: Allow changing the primary MAC address
Date: Tue, 10 Nov 2026 16:55:05 +0000 [thread overview]
Message-ID: <179432970545.994134.2511152521699003993@kernel.org> (raw)
In-Reply-To: <425F4F0858D134DD+20261106112544.44210-1-dong100@mucse.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit 'net: rnpgbe: Allow changing the primary MAC address'
adds two entries to rnpgbe_netdev_ops in…
--
net: rnpgbe: Allow changing the primary MAC address
This commit adds ndo_set_mac_address support to the rnpgbe driver, so the
primary MAC address can be changed while the interface is up or down. The
new address is validated with eth_prepare_mac_addr_change(), written to
RAR 0, and then committed to the netdev.
> diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> index 31871b244882d..09d499dc10eeb 100644
> --- a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> +++ b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> @@ -160,6 +160,8 @@ static const struct net_device_ops rnpgbe_netdev_ops = {
> .ndo_stop = rnpgbe_close,
> .ndo_start_xmit = rnpgbe_xmit_frame,
> .ndo_set_rx_mode_async = rnpgbe_set_rx_mode,
> .ndo_set_mac_address = rnpgbe_set_mac_address,
> + .ndo_validate_addr = eth_validate_addr,
[Severity: Low]
This isn't a bug, but should the commit message also mention the
ndo_validate_addr hook added to rnpgbe_netdev_ops?
The commit message only covers ndo_set_mac_address:
Add ndo_set_mac_address support to change the primary MAC address
while the interface is up or down. Validate the new address with the
standard Ethernet helpers, then update the primary receive address
filter and the netdev address.
The "Validate the new address" sentence refers to the
eth_prepare_mac_addr_change() call in rnpgbe_set_mac_address().
eth_validate_addr is a separate change. __dev_open() calls it on every
ifup, so opening the device can now fail with -EADDRNOTAVAIL if
netdev->dev_addr is not a valid unicast address. Before this patch, open
did no such check.
As far as I can tell this check cannot fire today. In
rnpgbe_add_adapter(), probe either sets a firmware MAC that has already
passed is_valid_ether_addr() in rnpgbe_get_permanent_mac(), or it falls
back to eth_hw_addr_random(). After probe, rnpgbe_set_mac_address()
rejects invalid addresses.
Could the commit message mention the open-time validation, or could the
hook move to its own patch?
> .ndo_get_stats64 = rnpgbe_get_stats64,
> };
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/FB722C2F25FE9005%2B20261106112420.43050-1-dong100%40mucse.com
next prev parent reply other threads:[~2026-11-10 16:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 11:24 [PATCH net-next 0/5] net: rnpgbe: Add basic management and statistics Dong Yibo
2026-11-06 11:25 ` [PATCH net-next 1/5] net: rnpgbe: Add basic ethtool support Dong Yibo
2026-11-07 17:45 ` Andrew Lunn
2026-11-06 11:25 ` [PATCH net-next 2/5] net: rnpgbe: Report link settings through ethtool Dong Yibo
2026-11-07 17:57 ` Andrew Lunn
2026-11-09 5:57 ` Yibo Dong
2026-11-10 16:55 ` netdev-bot+sashiko
2026-11-06 11:25 ` [PATCH net-next 3/5] net: rnpgbe: Support copper link configuration Dong Yibo
2026-11-07 18:04 ` Andrew Lunn
2026-11-09 9:21 ` Yibo Dong
2026-11-10 16:55 ` netdev-bot+sashiko
2026-11-06 11:25 ` [PATCH net-next 4/5] net: rnpgbe: Allow changing the primary MAC address Dong Yibo
2026-11-10 16:55 ` netdev-bot+sashiko [this message]
2026-11-06 11:25 ` [PATCH net-next 5/5] net: rnpgbe: Add hardware and queue statistics Dong Yibo
2026-11-10 16:55 ` netdev-bot+sashiko
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=179432970545.994134.2511152521699003993@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dong100@mucse.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yaojun@mucse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®