net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 15 Jan 2017 17:05:38 +0000 (19:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:36 +0000 (08:49 -0700)
commita69f0d54fdc96914a041039c22e46da8e95c4d22
treeeb446524bd15a633f835cb51cf82c4f091a3c029
parent22cccef1fc709cae4d78c47c7371acf24f328037
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy

[ Upstream commit 5bae8c031053c69b4aa74b7f1ba15d4ec8426208 ]

We must re-enable RoCE on the e-switch management port (PF) only after destroying
the FDB in its switchdev/offloaded mode. Otherwise, when encapsulation is supported,
this re-enablement will fail.

Also, it's more natural and symmetric to disable RoCE on the PF before we create
the FDB under switchdev mode, so do that as well and revert if getting into error
during the mode change later.

Fixes: 9da34cd34e85 ('net/mlx5: Disable RoCE on the e-switch management [..]')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c