linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net: marvell: prestera: fix brige port operation
@ 2021-11-18 19:48 Volodymyr Mytnyk
  2021-11-19 12:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Volodymyr Mytnyk @ 2021-11-18 19:48 UTC (permalink / raw)
  To: netdev, vladimir.oltean
  Cc: ioana.ciornei, mickeyr, serhiy.pshyk, taras.chornyi,
	Volodymyr Mytnyk, Taras Chornyi, David S. Miller, Jakub Kicinski,
	linux-kernel

From: Volodymyr Mytnyk <vmytnyk@marvell.com>

Return NOTIFY_DONE (dont't care) for switchdev notifications
that prestera driver don't know how to handle them.

With introduction of SWITCHDEV_BRPORT_[UN]OFFLOADED switchdev
events, the driver rejects adding swport to bridge operation
which is handled by prestera_bridge_port_join() func. The root
cause of this is that prestera driver returns error (EOPNOTSUPP)
in prestera_switchdev_blk_event() handler for unknown swdev
events. This causes switchdev_bridge_port_offload() to fail
when adding port to bridge in prestera_bridge_port_join().

Fixes: 957e2235e526 ("net: make switchdev_bridge_port_{,unoffload} loosely coupled with the bridge")
Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
---

Changes in V2:
 - Split changes into two independent commits:
   - fix prestera_switchdev_blk_event() handler (THIS PATCH)
   - fix error path handling in prestera_bridge_port_join() (NEW)
 - Updated fix tags in both patches according to review comments
 - Fix commit messages in both patches

 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
index 3ce6ccd0f539..79f2fca0d412 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
@@ -1124,7 +1124,7 @@ static int prestera_switchdev_blk_event(struct notifier_block *unused,
 						     prestera_port_obj_attr_set);
 		break;
 	default:
-		err = -EOPNOTSUPP;
+		return NOTIFY_DONE;
 	}
 
 	return notifier_from_errno(err);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net v2] net: marvell: prestera: fix brige port operation
  2021-11-18 19:48 [PATCH net v2] net: marvell: prestera: fix brige port operation Volodymyr Mytnyk
@ 2021-11-19 12:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-19 12:00 UTC (permalink / raw)
  To: Volodymyr Mytnyk
  Cc: netdev, vladimir.oltean, ioana.ciornei, mickeyr, serhiy.pshyk,
	taras.chornyi, vmytnyk, tchornyi, davem, kuba, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 18 Nov 2021 21:48:03 +0200 you wrote:
> From: Volodymyr Mytnyk <vmytnyk@marvell.com>
> 
> Return NOTIFY_DONE (dont't care) for switchdev notifications
> that prestera driver don't know how to handle them.
> 
> With introduction of SWITCHDEV_BRPORT_[UN]OFFLOADED switchdev
> events, the driver rejects adding swport to bridge operation
> which is handled by prestera_bridge_port_join() func. The root
> cause of this is that prestera driver returns error (EOPNOTSUPP)
> in prestera_switchdev_blk_event() handler for unknown swdev
> events. This causes switchdev_bridge_port_offload() to fail
> when adding port to bridge in prestera_bridge_port_join().
> 
> [...]

Here is the summary with links:
  - [net,v2] net: marvell: prestera: fix brige port operation
    https://git.kernel.org/netdev/net/c/253e9b4d11e5

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-11-19 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 19:48 [PATCH net v2] net: marvell: prestera: fix brige port operation Volodymyr Mytnyk
2021-11-19 12:00 ` 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).