From: Felix Maurer <fmaurer@redhat.com>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: netdev@vger.kernel.org, acsjakub@amazon.de, liuhangbin@gmail.com,
kees@kernel.org, horms@kernel.org, pabeni@redhat.com,
kuba@kernel.org, edumazet@google.com, davem@davemloft.net,
Luka Gejak <luka.gejak@linux.dev>
Subject: Re: [PATCH net-next] net: hsr: emit notification for PRP slave2 changed hw addr on port deletion
Date: Tue, 7 Apr 2026 16:08:08 +0200 [thread overview]
Message-ID: <adUPyJ1-FDDezooG@thinkpad> (raw)
In-Reply-To: <20260403123928.4249-2-fmancera@suse.de>
On Fri, Apr 03, 2026 at 02:39:29PM +0200, Fernando Fernandez Mancera wrote:
> On PRP protocol, when deleting the port the MAC address change
> notification was missing. In addition to that, make sure to only perform
> the MAC address change on slave2 deletion and PRP protocol as the
> operation isn't necessary for HSR nor slave1.
>
> Note that the eth_hw_addr_set() is correct on PRP context as the slaves
> are either in promiscuous mode or forward offload enabled.
>
> Fixes: b65999e7238e ("net: hsr: sync hw addr of slave2 according to slave1 hw addr on PRP")
> Reported-by: Luka Gejak <luka.gejak@linux.dev>
> Closes: https://lore.kernel.org/netdev/DHFCZEM93FTT.1RWFBIE32K7OT@linux.dev/
> Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
I don't have a preference for the tree, but:
Reviewed-by: Felix Maurer <fmaurer@redhat.com>
> ---
> Note: routed through net-next tree as the next net tree as rc6 batch is
> already out and I do not think this is worth to be included in a last
> call batch. Anyway, if maintainer thinks it is, feel free to apply it to
> net tree.
> ---
> net/hsr/hsr_slave.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
> index 44f83c8c56a7..d9af9e65f72f 100644
> --- a/net/hsr/hsr_slave.c
> +++ b/net/hsr/hsr_slave.c
> @@ -243,7 +243,11 @@ void hsr_del_port(struct hsr_port *port)
> if (!port->hsr->fwd_offloaded)
> dev_set_promiscuity(port->dev, -1);
> netdev_upper_dev_unlink(port->dev, master->dev);
> - eth_hw_addr_set(port->dev, port->original_macaddress);
> + if (hsr->prot_version == PRP_V1 &&
> + port->type == HSR_PT_SLAVE_B) {
> + eth_hw_addr_set(port->dev, port->original_macaddress);
> + call_netdevice_notifiers(NETDEV_CHANGEADDR, port->dev);
> + }
> }
>
> kfree_rcu(port, rcu);
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-04-07 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 12:39 [PATCH net-next] net: hsr: emit notification for PRP slave2 changed hw addr on port deletion Fernando Fernandez Mancera
2026-04-07 13:29 ` Paolo Abeni
2026-04-07 13:37 ` Fernando Fernandez Mancera
2026-04-07 15:08 ` Paolo Abeni
2026-04-07 14:08 ` Felix Maurer [this message]
2026-04-07 15:10 ` 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=adUPyJ1-FDDezooG@thinkpad \
--to=fmaurer@redhat.com \
--cc=acsjakub@amazon.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=luka.gejak@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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