* [PATCH net-next] net: ocelot: Fix deletetion of MRP entries from MAC table
@ 2021-03-18 19:29 Horatiu Vultur
2021-03-19 2:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Horatiu Vultur @ 2021-03-18 19:29 UTC (permalink / raw)
To: davem, kuba, vladimir.oltean, claudiu.manoil, alexandre.belloni
Cc: UNGLinuxDriver, netdev, linux-kernel, Horatiu Vultur, Dan Carpenter
When a MRP ring was deleted or disabled, the driver was iterating over
the ports to detect if any other MPR rings exists and in case it didn't
exist it would delete the MAC table entry. But the problem was that it
used the last iterated port to delete the MAC table entry and this could
be a NULL port.
The fix consists of using the port on which the function was called.
Fixes: 7c588c3e96e9733a ("net: ocelot: Extend MRP")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/net/ethernet/mscc/ocelot_mrp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mscc/ocelot_mrp.c b/drivers/net/ethernet/mscc/ocelot_mrp.c
index 439129a65b71..c3cbcaf64bb2 100644
--- a/drivers/net/ethernet/mscc/ocelot_mrp.c
+++ b/drivers/net/ethernet/mscc/ocelot_mrp.c
@@ -177,7 +177,7 @@ int ocelot_mrp_del(struct ocelot *ocelot, int port,
goto out;
}
- ocelot_mrp_del_mac(ocelot, ocelot_port);
+ ocelot_mrp_del_mac(ocelot, ocelot->ports[port]);
out:
return 0;
}
@@ -251,7 +251,7 @@ int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
goto out;
}
- ocelot_mrp_del_mac(ocelot, ocelot_port);
+ ocelot_mrp_del_mac(ocelot, ocelot->ports[port]);
out:
return 0;
}
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ocelot: Fix deletetion of MRP entries from MAC table
2021-03-18 19:29 [PATCH net-next] net: ocelot: Fix deletetion of MRP entries from MAC table Horatiu Vultur
@ 2021-03-19 2:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-19 2:20 UTC (permalink / raw)
To: Horatiu Vultur
Cc: davem, kuba, vladimir.oltean, claudiu.manoil, alexandre.belloni,
UNGLinuxDriver, netdev, linux-kernel, dan.carpenter
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 18 Mar 2021 20:29:38 +0100 you wrote:
> When a MRP ring was deleted or disabled, the driver was iterating over
> the ports to detect if any other MPR rings exists and in case it didn't
> exist it would delete the MAC table entry. But the problem was that it
> used the last iterated port to delete the MAC table entry and this could
> be a NULL port.
>
> The fix consists of using the port on which the function was called.
>
> [...]
Here is the summary with links:
- [net-next] net: ocelot: Fix deletetion of MRP entries from MAC table
https://git.kernel.org/netdev/net-next/c/d25fde64d1c2
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] 2+ messages in thread
end of thread, other threads:[~2021-03-19 2:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 19:29 [PATCH net-next] net: ocelot: Fix deletetion of MRP entries from MAC table Horatiu Vultur
2021-03-19 2:20 ` 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).