* [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload
@ 2026-09-08 9:08 MD Danish Anwar
2026-09-09 16:34 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: MD Danish Anwar @ 2026-09-08 9:08 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Felix Maurer, Fernando Fernandez Mancera,
MD Danish Anwar, Hangbin Liu, Kees Cook, Xiaoliang Yang,
Lukasz Majewski
Cc: netdev, linux-kernel
hsr_portdev_setup() skips promiscuous mode on non-master ports when
hsr->fwd_offloaded is set. fwd_offloaded is derived only from the ring
slaves' NETIF_F_HW_HSR_FWD bit, so this also skips it for the interlink
port, which never gets forwarding offload. Without promiscuous mode,
the interlink NIC drops unicast frames addressed to hsr_dev's MAC
(e.g. SAN traffic to the RedBox), breaking RedBox whenever the ring is
HW-offloaded.
Fixes: 5055cccfc2d1 ("net: hsr: Provide RedBox support (HSR-SAN)")
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
---
net/hsr/hsr_slave.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index 01c73b4b50ddd..a546f70f9cc8b 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -149,9 +149,12 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev,
int res;
/* Don't use promiscuous mode for offload since L2 frame forward
- * happens at the offloaded hardware.
+ * happens at the offloaded hardware. The interlink port never
+ * gets forwarding offload (RedBox forwarding to/from it is done
+ * by this driver), so it still needs promiscuous mode to receive
+ * frames addressed to hsr_dev's MAC rather than its own.
*/
- if (!port->hsr->fwd_offloaded) {
+ if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK) {
res = dev_set_promiscuity(dev, 1);
if (res)
return res;
@@ -176,7 +179,7 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev,
fail_rx_handler:
netdev_upper_dev_unlink(dev, hsr_dev);
fail_upper_dev_link:
- if (!port->hsr->fwd_offloaded)
+ if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK)
dev_set_promiscuity(dev, -1);
return res;
@@ -240,7 +243,7 @@ void hsr_del_port(struct hsr_port *port)
netdev_update_features(master->dev);
dev_set_mtu(master->dev, hsr_get_max_mtu(hsr));
netdev_rx_handler_unregister(port->dev);
- if (!port->hsr->fwd_offloaded)
+ if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK)
dev_set_promiscuity(port->dev, -1);
if (port->type == HSR_PT_SLAVE_A || port->type == HSR_PT_SLAVE_B)
vlan_vids_del_by_dev(port->dev, master->dev);
base-commit: 8d6cd188508513503805c156165de38e4e4a8615
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload
2026-09-08 9:08 [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload MD Danish Anwar
@ 2026-09-09 16:34 ` Simon Horman
2026-09-10 9:09 ` Fernando Fernandez Mancera
2026-09-10 15:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-09-09 16:34 UTC (permalink / raw)
To: MD Danish Anwar
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Felix Maurer, Fernando Fernandez Mancera, Hangbin Liu, Kees Cook,
Xiaoliang Yang, Lukasz Majewski, netdev, linux-kernel
On Tue, Sep 08, 2026 at 02:38:56PM +0530, MD Danish Anwar wrote:
> hsr_portdev_setup() skips promiscuous mode on non-master ports when
> hsr->fwd_offloaded is set. fwd_offloaded is derived only from the ring
> slaves' NETIF_F_HW_HSR_FWD bit, so this also skips it for the interlink
> port, which never gets forwarding offload. Without promiscuous mode,
> the interlink NIC drops unicast frames addressed to hsr_dev's MAC
> (e.g. SAN traffic to the RedBox), breaking RedBox whenever the ring is
> HW-offloaded.
>
> Fixes: 5055cccfc2d1 ("net: hsr: Provide RedBox support (HSR-SAN)")
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload
2026-09-08 9:08 [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload MD Danish Anwar
2026-09-09 16:34 ` Simon Horman
@ 2026-09-10 9:09 ` Fernando Fernandez Mancera
2026-09-10 15:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Fernando Fernandez Mancera @ 2026-09-10 9:09 UTC (permalink / raw)
To: MD Danish Anwar, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Felix Maurer, Hangbin Liu, Kees Cook,
Xiaoliang Yang, Lukasz Majewski
Cc: netdev, linux-kernel
On 9/8/26 11:08 AM, MD Danish Anwar wrote:
> hsr_portdev_setup() skips promiscuous mode on non-master ports when
> hsr->fwd_offloaded is set. fwd_offloaded is derived only from the ring
> slaves' NETIF_F_HW_HSR_FWD bit, so this also skips it for the interlink
> port, which never gets forwarding offload. Without promiscuous mode,
> the interlink NIC drops unicast frames addressed to hsr_dev's MAC
> (e.g. SAN traffic to the RedBox), breaking RedBox whenever the ring is
> HW-offloaded.
>
> Fixes: 5055cccfc2d1 ("net: hsr: Provide RedBox support (HSR-SAN)")
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Thanks!
> ---
> net/hsr/hsr_slave.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
> index 01c73b4b50ddd..a546f70f9cc8b 100644
> --- a/net/hsr/hsr_slave.c
> +++ b/net/hsr/hsr_slave.c
> @@ -149,9 +149,12 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev,
> int res;
>
> /* Don't use promiscuous mode for offload since L2 frame forward
> - * happens at the offloaded hardware.
> + * happens at the offloaded hardware. The interlink port never
> + * gets forwarding offload (RedBox forwarding to/from it is done
> + * by this driver), so it still needs promiscuous mode to receive
> + * frames addressed to hsr_dev's MAC rather than its own.
> */
> - if (!port->hsr->fwd_offloaded) {
> + if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK) {
> res = dev_set_promiscuity(dev, 1);
> if (res)
> return res;
> @@ -176,7 +179,7 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev,
> fail_rx_handler:
> netdev_upper_dev_unlink(dev, hsr_dev);
> fail_upper_dev_link:
> - if (!port->hsr->fwd_offloaded)
> + if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK)
> dev_set_promiscuity(dev, -1);
>
> return res;
> @@ -240,7 +243,7 @@ void hsr_del_port(struct hsr_port *port)
> netdev_update_features(master->dev);
> dev_set_mtu(master->dev, hsr_get_max_mtu(hsr));
> netdev_rx_handler_unregister(port->dev);
> - if (!port->hsr->fwd_offloaded)
> + if (!port->hsr->fwd_offloaded || port->type == HSR_PT_INTERLINK)
> dev_set_promiscuity(port->dev, -1);
> if (port->type == HSR_PT_SLAVE_A || port->type == HSR_PT_SLAVE_B)
> vlan_vids_del_by_dev(port->dev, master->dev);
>
> base-commit: 8d6cd188508513503805c156165de38e4e4a8615
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload
2026-09-08 9:08 [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload MD Danish Anwar
2026-09-09 16:34 ` Simon Horman
2026-09-10 9:09 ` Fernando Fernandez Mancera
@ 2026-09-10 15:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-10 15:50 UTC (permalink / raw)
To: Md Danish Anwar
Cc: davem, edumazet, kuba, pabeni, horms, fmaurer, fmancera,
liuhangbin, kees, xiaoliang.yang_1, lukma, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 8 Sep 2026 14:38:56 +0530 you wrote:
> hsr_portdev_setup() skips promiscuous mode on non-master ports when
> hsr->fwd_offloaded is set. fwd_offloaded is derived only from the ring
> slaves' NETIF_F_HW_HSR_FWD bit, so this also skips it for the interlink
> port, which never gets forwarding offload. Without promiscuous mode,
> the interlink NIC drops unicast frames addressed to hsr_dev's MAC
> (e.g. SAN traffic to the RedBox), breaking RedBox whenever the ring is
> HW-offloaded.
>
> [...]
Here is the summary with links:
- [net] net: hsr: enable promiscuous mode on interlink port with fwd offload
https://git.kernel.org/netdev/net/c/a2dc179481d1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-10 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-08 9:08 [PATCH net] net: hsr: enable promiscuous mode on interlink port with fwd offload MD Danish Anwar
2026-09-09 16:34 ` Simon Horman
2026-09-10 9:09 ` Fernando Fernandez Mancera
2026-09-10 15:50 ` patchwork-bot+netdevbpf
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®