net/mlx5: Allow/disallow LAG according to pre-req only
authorRabie Loulou <rabiel@mellanox.com>
Wed, 6 Jun 2018 13:31:34 +0000 (16:31 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 14 Dec 2018 21:28:54 +0000 (13:28 -0800)
commiteff849b2c669ebf0df88762f082bcb252f8e883c
treeb2eeb4dc8942937041d1ecf6c9cd526f5c659f81
parent3b5ff59fd851d8e8c7c3ba08b01011baffa60cb6
net/mlx5: Allow/disallow LAG according to pre-req only

Remove the lag forbid/allow functions, change the lag prereq check to
run in the do-bond logic, so every change in the prereq state will
cause LAG to be disabled/enabled accordingly after the next do-bond run.

Add lag update function, so every component which changes the prereq
state and want the LAG to re-calc the conditions can call the update
function.

Signed-off-by: Rabie Loulou <rabiel@mellanox.com>
Signed-off-by: Aviv Heller <avivh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
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