From: Junxian Huang huangjunxian6@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6ZACP
---------------------------------------------------------------
RoCE Bonding supports up to 4 slaves in a bond group, but currently there are no such constraint in the driver. This patch fixes it.
Fixes: 6ba084e0f031 ("RDMA/hns: add constraints for bonding-unsupported situations") Signed-off-by: Junxian Huang huangjunxian6@hisilicon.com --- drivers/infiniband/hw/hns/hns_roce_bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_bond.c b/drivers/infiniband/hw/hns/hns_roce_bond.c index 92ddbe61a41b..9f642b0adcb7 100644 --- a/drivers/infiniband/hw/hns/hns_roce_bond.c +++ b/drivers/infiniband/hw/hns/hns_roce_bond.c @@ -703,7 +703,7 @@ static enum bond_support_type } rcu_read_unlock();
- if (slave_num <= 1) + if (slave_num <= 1 || slave_num > ROCE_BOND_FUNC_MAX) support = false; if (support) return BOND_SUPPORT;