Lines Matching refs:hopnum
1083 static bool hem_list_is_bottom_bt(int hopnum, int bt_level) in hem_list_is_bottom_bt() argument
1092 return bt_level >= (hopnum ? hopnum - 1 : hopnum); in hem_list_is_bottom_bt()
1101 static u64 hem_list_calc_ba_range(int hopnum, int bt_level, int unit) in hem_list_calc_ba_range() argument
1107 if (hopnum <= bt_level) in hem_list_calc_ba_range()
1121 max = hopnum - bt_level; in hem_list_calc_ba_range()
1145 if (!r->hopnum) in hns_roce_hem_list_calc_root_ba()
1148 if (r->hopnum > 1) { in hns_roce_hem_list_calc_root_ba()
1149 step = hem_list_calc_ba_range(r->hopnum, 1, unit); in hns_roce_hem_list_calc_root_ba()
1168 const int hopnum = r->hopnum; in hem_list_alloc_mid_bt() local
1177 if (hopnum <= 1) in hem_list_alloc_mid_bt()
1180 if (hopnum > HNS_ROCE_MAX_BT_LEVEL) { in hem_list_alloc_mid_bt()
1181 dev_err(hr_dev->dev, "invalid hopnum %d!\n", hopnum); in hem_list_alloc_mid_bt()
1193 for (level = 0; level < hopnum; level++) in hem_list_alloc_mid_bt()
1197 for (level = 1; level < hopnum; level++) { in hem_list_alloc_mid_bt()
1198 if (!hem_list_is_bottom_bt(hopnum, level)) { in hem_list_alloc_mid_bt()
1206 step = hem_list_calc_ba_range(hopnum, level, unit); in hem_list_alloc_mid_bt()
1222 if (hem_list_is_bottom_bt(hopnum, level)) in hem_list_alloc_mid_bt()
1234 for (level = 1; level < hopnum; level++) in hem_list_alloc_mid_bt()
1240 for (level = 1; level < hopnum; level++) in hem_list_alloc_mid_bt()
1288 r->count, !r->hopnum); in alloc_fake_root_bt()
1293 if (r->hopnum) in alloc_fake_root_bt()
1301 return r->hopnum ? r->count : 0; in alloc_fake_root_bt()
1313 step = hem_list_calc_ba_range(r->hopnum, 1, unit); in setup_middle_bt()
1357 if (hem_list_is_bottom_bt(r->hopnum, 0)) in setup_root_hem()