Lines Matching refs:hopnum
1026 static bool hem_list_is_bottom_bt(int hopnum, int bt_level) in hem_list_is_bottom_bt() argument
1035 return bt_level >= (hopnum ? hopnum - 1 : hopnum); in hem_list_is_bottom_bt()
1044 static u64 hem_list_calc_ba_range(int hopnum, int bt_level, int unit) in hem_list_calc_ba_range() argument
1050 if (hopnum <= bt_level) in hem_list_calc_ba_range()
1064 max = hopnum - bt_level; in hem_list_calc_ba_range()
1087 if (r->hopnum > 1) { in hns_roce_hem_list_calc_root_ba()
1088 step = hem_list_calc_ba_range(r->hopnum, 1, unit); in hns_roce_hem_list_calc_root_ba()
1107 const int hopnum = r->hopnum; in hem_list_alloc_mid_bt() local
1116 if (hopnum <= 1) in hem_list_alloc_mid_bt()
1119 if (hopnum > HNS_ROCE_MAX_BT_LEVEL) { in hem_list_alloc_mid_bt()
1120 dev_err(hr_dev->dev, "invalid hopnum %d!\n", hopnum); in hem_list_alloc_mid_bt()
1132 for (level = 0; level < hopnum; level++) in hem_list_alloc_mid_bt()
1136 for (level = 1; level < hopnum; level++) { in hem_list_alloc_mid_bt()
1137 if (!hem_list_is_bottom_bt(hopnum, level)) { in hem_list_alloc_mid_bt()
1145 step = hem_list_calc_ba_range(hopnum, level, unit); in hem_list_alloc_mid_bt()
1161 if (hem_list_is_bottom_bt(hopnum, level)) in hem_list_alloc_mid_bt()
1173 for (level = 1; level < hopnum; level++) in hem_list_alloc_mid_bt()
1179 for (level = 1; level < hopnum; level++) in hem_list_alloc_mid_bt()
1242 step = hem_list_calc_ba_range(r->hopnum, 1, unit); in setup_middle_bt()
1286 if (hem_list_is_bottom_bt(r->hopnum, 0)) in setup_root_hem()