]> git.itanic.dy.fi Git - linux-stable/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)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 12 Oct 2023 18:10:33 +0000 (11:10 -0700)
commit7624e58a8b3a251e3e5108b32f2183b34453db32
treefa68c7af9edefecd9884f3ee2e9a6b680cc69573
parent8698cb92eeece1e326a4d6a051bcf143037c4d31
net/mlx5: E-switch, register event handler before arming the event

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>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c