diff mbox series

[net,v2] net: marvell: prestera: fix brige port operation

Message ID 1637264883-24561-1-git-send-email-volodymyr.mytnyk@plvision.eu (mailing list archive)
State Accepted
Commit 253e9b4d11e577bb8cbc77ef68a9ff46438065ca
Delegated to: Netdev Maintainers
Headers show
Series [net,v2] net: marvell: prestera: fix brige port operation | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Volodymyr Mytnyk Nov. 18, 2021, 7:48 p.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 19, 2021, noon UTC | #1
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!
diff mbox series

Patch

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);