net/mlx5: E-Switch, Handle mode change failures
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 18 Sep 2016 15:20:29 +0000 (18:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2016 02:10:16 +0000 (22:10 -0400)
commit6c419ba8e2580ab17c164db6e918e163d3537ec1
treec2cd546376bf110d9b1dc28021c9f45f3308faa7
parent4eea37d7b92076fdeac2a21e5f4dbd92d286719d
net/mlx5: E-Switch, Handle mode change failures

E-switch mode changes involve creating HW tables, potentially allocating
netdevices, etc, and things can fail. Add an attempt to rollback to the
existing mode when changing to the new mode fails. Only if rollback fails,
getting proper SRIOV functionality requires module unload or sriov
disablement/enablement.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c