* [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
@ 2024-03-22 10:04 Ravi Gunasekaran
2024-03-22 11:09 ` Jiri Pirko
2024-03-26 3:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ravi Gunasekaran @ 2024-03-22 10:04 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: r-gunasekaran, horms, netdev, linux-kernel, srk
commit e748d0fd66ab ("net: hsr: Disable promiscuous mode in
offload mode") disables promiscuous mode of slave devices
while creating an HSR interface. But while deleting the
HSR interface, it does not take care of it. It decreases the
promiscuous mode count, which eventually enables promiscuous
mode on the slave devices when creating HSR interface again.
Fix this by not decrementing the promiscuous mode count while
deleting the HSR interface when offload is enabled.
Fixes: e748d0fd66ab ("net: hsr: Disable promiscuous mode in offload mode")
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
---
net/hsr/hsr_slave.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index e5742f2a2d52..1b6457f357bd 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -220,7 +220,8 @@ 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);
- dev_set_promiscuity(port->dev, -1);
+ if (!port->hsr->fwd_offloaded)
+ dev_set_promiscuity(port->dev, -1);
netdev_upper_dev_unlink(port->dev, master->dev);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
2024-03-22 10:04 [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode Ravi Gunasekaran
@ 2024-03-22 11:09 ` Jiri Pirko
2024-03-26 3:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2024-03-22 11:09 UTC (permalink / raw)
To: Ravi Gunasekaran
Cc: davem, edumazet, kuba, pabeni, horms, netdev, linux-kernel, srk
Fri, Mar 22, 2024 at 11:04:47AM CET, r-gunasekaran@ti.com wrote:
>commit e748d0fd66ab ("net: hsr: Disable promiscuous mode in
>offload mode") disables promiscuous mode of slave devices
>while creating an HSR interface. But while deleting the
>HSR interface, it does not take care of it. It decreases the
>promiscuous mode count, which eventually enables promiscuous
>mode on the slave devices when creating HSR interface again.
>
>Fix this by not decrementing the promiscuous mode count while
>deleting the HSR interface when offload is enabled.
>
>Fixes: e748d0fd66ab ("net: hsr: Disable promiscuous mode in offload mode")
>Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
2024-03-22 10:04 [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode Ravi Gunasekaran
2024-03-22 11:09 ` Jiri Pirko
@ 2024-03-26 3:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-26 3:10 UTC (permalink / raw)
To: Ravi Gunasekaran
Cc: davem, edumazet, kuba, pabeni, horms, netdev, linux-kernel, srk
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 22 Mar 2024 15:34:47 +0530 you wrote:
> commit e748d0fd66ab ("net: hsr: Disable promiscuous mode in
> offload mode") disables promiscuous mode of slave devices
> while creating an HSR interface. But while deleting the
> HSR interface, it does not take care of it. It decreases the
> promiscuous mode count, which eventually enables promiscuous
> mode on the slave devices when creating HSR interface again.
>
> [...]
Here is the summary with links:
- [net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
https://git.kernel.org/netdev/net/c/b11c81731c81
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] 3+ messages in thread
end of thread, other threads:[~2024-03-26 3:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22 10:04 [PATCH net] net: hsr: hsr_slave: Fix the promiscuous mode in offload mode Ravi Gunasekaran
2024-03-22 11:09 ` Jiri Pirko
2024-03-26 3:10 ` 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;
as well as URLs for NNTP newsgroup(s).