]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: E-switch, register event handler before arming the event
authorShay Drory <shayd@nvidia.com>
Sun, 27 Aug 2023 10:31:53 +0000 (13:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:12 +0000 (12:03 +0200)
commit0aa1e83a20f12e9eaad32f72212ebc7fe0c29c95
tree4c3acebdb45f8c29a4d8272065ead98e197c4412
parentc21bff1c99b6ba30d1f7725ee04abc98b74108db
net/mlx5: E-switch, register event handler before arming the event

[ Upstream commit 7624e58a8b3a251e3e5108b32f2183b34453db32 ]

Currently, mlx5 is registering event handler for vport context change
event some time after arming the event. this can lead to missing an
event, which will result in wrong rules in the FDB.
Hence, register the event handler before arming the event.

This solution is valid since FW is sending vport context change event
only on vports which SW armed, and SW arming the vport when enabling
it, which is done after the FDB has been created.

Fixes: 6933a9379559 ("net/mlx5: E-Switch, Use async events chain")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c