Loading
RDMA/hns: Add bonding event handler
Register netdev notifier for two bonding events NETDEV_CHANGEUPPER and NETDEV_CHANGELOWERSTATE. In NETDEV_CHANGEUPPER event handler, check some rules about the HW constraints when trying to link a new slave to the masteri, and store some bonding information from the notifier. In unlinking case, simply check the number of the rest slaves to decide whether the bond is still supported. In NETDEV_CHANGELOWERSTATE event handler, not much is done. It simply sets the bond state when the bond is ready, which will be used later. Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20251112093510.3696363-4-huangjunxian6@hisilicon.com Signed-off-by:
Leon Romanovsky <leon@kernel.org>