Skip to content
  • Moni Shoua's avatar
    net/mlx5: Undo LAG upon request to create virtual functions · 552db7bc
    Moni Shoua authored
    
    
    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: default avatarMoni Shoua <monis@mellanox.com>
    Reviewed-by: default avatarAviv Heller <avivh@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    552db7bc