]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Undo LAG upon request to create virtual functions
authorMoni Shoua <monis@mellanox.com>
Tue, 9 May 2017 09:20:55 +0000 (12:20 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 15 Jun 2017 21:12:41 +0000 (00:12 +0300)
commitd65423028d4c626a879b6b1f95c08237c4c3382b
tree7a0ecc483e62b333276b79abcde8010b6dbe6ec3
parent26ce9134c1bc54065640fa4766bcb8030a7db698
net/mlx5: Undo LAG upon request to create virtual functions

LAG cannot work if virtual functions are present. Therefore, if LAG is
configured, the attempt to create virtual functions will fail. This gives
precedence to LAG over SRIOV which is not the desired behavior as users
might want to use the bonding/teaming driver also want to work with SRIOV.
In that case we don't want to force an order of actions, first create
virtual functions and only than configure a bonding/teaming net device.
To fix, if LAG is configured during a request to create virtual
functions, remove it and continue.

We ignore ENODEV when trying to forbid lag. This makes sense
because "No such device" means that lag is forbidden anyway.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Aviv Heller <avivh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/sriov.c