* [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload
@ 2022-01-17 12:53 Horatiu Vultur
2022-01-17 13:00 ` Vladimir Oltean
2022-01-17 13:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Horatiu Vultur @ 2022-01-17 12:53 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: vladimir.oltean, claudiu.manoil, alexandre.belloni,
UNGLinuxDriver, davem, kuba, Horatiu Vultur
In the blamed commit, the call to the function
switchdev_bridge_port_offload was passing the wrong argument for
atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
This patch fixes this issue.
Fixes: 4e51bf44a03af6 ("net: bridge: move the switchdev object replay helpers to "push" mode")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/net/ethernet/mscc/ocelot_net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
index 8115c3db252e..e271b6225b72 100644
--- a/drivers/net/ethernet/mscc/ocelot_net.c
+++ b/drivers/net/ethernet/mscc/ocelot_net.c
@@ -1187,7 +1187,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
ocelot_port_bridge_join(ocelot, port, bridge);
err = switchdev_bridge_port_offload(brport_dev, dev, priv,
- &ocelot_netdevice_nb,
+ &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb,
false, extack);
if (err)
@@ -1201,7 +1201,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
err_switchdev_sync:
switchdev_bridge_port_unoffload(brport_dev, priv,
- &ocelot_netdevice_nb,
+ &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb);
err_switchdev_offload:
ocelot_port_bridge_leave(ocelot, port, bridge);
@@ -1214,7 +1214,7 @@ static void ocelot_netdevice_pre_bridge_leave(struct net_device *dev,
struct ocelot_port_private *priv = netdev_priv(dev);
switchdev_bridge_port_unoffload(brport_dev, priv,
- &ocelot_netdevice_nb,
+ &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb);
}
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload
2022-01-17 12:53 [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload Horatiu Vultur
@ 2022-01-17 13:00 ` Vladimir Oltean
2022-01-17 13:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2022-01-17 13:00 UTC (permalink / raw)
To: Horatiu Vultur
Cc: netdev, linux-kernel, Claudiu Manoil, alexandre.belloni,
UNGLinuxDriver, davem, kuba
On Mon, Jan 17, 2022 at 01:53:00PM +0100, Horatiu Vultur wrote:
> In the blamed commit, the call to the function
> switchdev_bridge_port_offload was passing the wrong argument for
> atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
> This patch fixes this issue.
>
> Fixes: 4e51bf44a03af6 ("net: bridge: move the switchdev object replay helpers to "push" mode")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
> drivers/net/ethernet/mscc/ocelot_net.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
> index 8115c3db252e..e271b6225b72 100644
> --- a/drivers/net/ethernet/mscc/ocelot_net.c
> +++ b/drivers/net/ethernet/mscc/ocelot_net.c
> @@ -1187,7 +1187,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
> ocelot_port_bridge_join(ocelot, port, bridge);
>
> err = switchdev_bridge_port_offload(brport_dev, dev, priv,
> - &ocelot_netdevice_nb,
> + &ocelot_switchdev_nb,
> &ocelot_switchdev_blocking_nb,
> false, extack);
> if (err)
> @@ -1201,7 +1201,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
>
> err_switchdev_sync:
> switchdev_bridge_port_unoffload(brport_dev, priv,
> - &ocelot_netdevice_nb,
> + &ocelot_switchdev_nb,
> &ocelot_switchdev_blocking_nb);
> err_switchdev_offload:
> ocelot_port_bridge_leave(ocelot, port, bridge);
> @@ -1214,7 +1214,7 @@ static void ocelot_netdevice_pre_bridge_leave(struct net_device *dev,
> struct ocelot_port_private *priv = netdev_priv(dev);
>
> switchdev_bridge_port_unoffload(brport_dev, priv,
> - &ocelot_netdevice_nb,
> + &ocelot_switchdev_nb,
> &ocelot_switchdev_blocking_nb);
> }
>
> --
> 2.33.0
>
Oh my... I remember noticing this issue when preparing those patches,
and also noticed that ocelot doesn't implement SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE
anyway. So I wanted to pass NULL anyway. I don't know what happened,
I must have made the fixup on a branch which wasn't the branch that I posted.
Anyway.
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload
2022-01-17 12:53 [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload Horatiu Vultur
2022-01-17 13:00 ` Vladimir Oltean
@ 2022-01-17 13:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-17 13:10 UTC (permalink / raw)
To: Horatiu Vultur
Cc: netdev, linux-kernel, vladimir.oltean, claudiu.manoil,
alexandre.belloni, UNGLinuxDriver, davem, kuba
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 17 Jan 2022 13:53:00 +0100 you wrote:
> In the blamed commit, the call to the function
> switchdev_bridge_port_offload was passing the wrong argument for
> atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
> This patch fixes this issue.
>
> Fixes: 4e51bf44a03af6 ("net: bridge: move the switchdev object replay helpers to "push" mode")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> [...]
Here is the summary with links:
- [net] net: ocelot: Fix the call to switchdev_bridge_port_offload
https://git.kernel.org/netdev/net/c/c0b7f7d7e0ad
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:[~2022-01-17 13:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 12:53 [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload Horatiu Vultur
2022-01-17 13:00 ` Vladimir Oltean
2022-01-17 13: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).