net/mlx5e: Add LAG warning if bond slave is not lag master
LAG offload can't be enabled if the enslaved PF is not lag master, which is indicated by HCA capabilities bit. It is cleared if more than 64 VFs are configured for this PF. Previously, a data structure is created to store lag info, including PFs to be enslaved, then a handler is registered for netdev notifier. However, this initialization is skipped if PF is not lag master. So PF can't handle CHANGEUPPER event from upper bond device. Even worse, PF is enslaved silently, and LAG offload is not activated. Fix this by registering netdev notifier for PFs which are not lag masters. When CHANGEUPPER event is received, and both physical ports (and only them) on the same NIC are about to be enslaved, a warning is returned for user to know it. Signed-off-by: NJianbo Liu <jianbol@mellanox.com> Reviewed-by: NRaed Salem <raeds@mellanox.com> Reviewed-by: NRoi Dayan <roid@mellanox.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Reviewed-by: NRaed Salem <raeds@nvidia.com> Reviewed-by: NRoi Dayan <roid@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Showing
想要评论请 注册 或 登录