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)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 29 Jan 2017 21:01:39 +0000 (23:01 +0200)
commit5bae8c031053c69b4aa74b7f1ba15d4ec8426208
tree194547220a6511888a52a2379d882cba8018452b
parent5403dc703ff277f8a2a12a83ac820750485f13b3
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy

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