summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/verbs.c
diff options
context:
space:
mode:
authorJunxian Huang <huangjunxian6@hisilicon.com>2025-11-12 17:35:07 +0800
committerLeon Romanovsky <leon@kernel.org>2025-11-24 02:58:30 -0500
commitd9023e461b73e2918c689e09b2ecf72389632da3 (patch)
tree21c9ac87a517d3dfd9ac4cd0bdc6ee1a8e2cd60c /drivers/infiniband/core/verbs.c
parent14f0455e4a61112583e61206a3d048cbecd7df86 (diff)
RDMA/hns: Implement bonding init/uninit process
Implement hns_roce_slave_init() and hns_roce_slave_uninit() for device init/uninit in bonding cases. The former is used to initialize a slave ibdev (when the slave is unlinked from a bond) or a bond ibdev, while the latter does the opposite. Most of the process is the same as regular device init/uninit, while some bonding‑specific steps below are also added. In bond device init flow, choose one slave to re-initialize as the main_hr_dev of the bond, and it will be the only device presented for multiple slaves. During registration, set and active netdev to the ibdev based on the link state of the slaves. When this main_hr_dev slave is being unlinked while the bond is still valid, choose a new slave from the rest and initialize it as the new bond device. In uninit flow, add a bond cleanup process, restore all the other slaves and clean up bond resource. This is only for the case where the port of main_hr_dev is directly removed without unlinking it from bond. Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20251112093510.3696363-6-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
0 files changed, 0 insertions, 0 deletions