RDMA/hns: Fix the concurrency error between bond and reset.
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I87LSW -------------------------------------------------------------------------- In the concurrency process between setting bond and reset, when the reset process is finished, the driver detects that bond resource has already been allocated, thus entering the bond recover process, where the bond state is set to HNS_ROCE_BOND_IS_BONDED. But at this point the set bond process hasn't been executed yet(i.e. slaves haven't been uninited). This wrong bond state leads to the abnormal reset result that 2 slaves are both registered as bond device. Thus delete the bond state setting in bond recover process. Besides, to fix other potential concurrency errors between bond and reset, some improvements are also added: 1. For the situation that reset occurs before bond work, add a reset check at the beginning of bond work. If there is an ongoing reset process, re-queue the bond work until the reset is finished. 2. For the situation that reset occurs during bond work, add reset checks to bond init/uninit process, treating this situation as an abnormal case. Fixes: b0f80ad2 ("RDMA/hns: Support reset recovery for RoCE bonding") Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com>
Loading
Please sign in to comment