Lines Matching refs:hop_num

79 static int hns_roce_get_bt_num(u32 table_type, u32 hop_num)  in hns_roce_get_bt_num()  argument
81 if (check_whether_bt_num_3(table_type, hop_num)) in hns_roce_get_bt_num()
83 else if (check_whether_bt_num_2(table_type, hop_num)) in hns_roce_get_bt_num()
85 else if (check_whether_bt_num_1(table_type, hop_num)) in hns_roce_get_bt_num()
108 mhop->hop_num = hr_dev->caps.qpc_hop_num; in hns_roce_calc_hem_mhop()
116 mhop->hop_num = hr_dev->caps.mpt_hop_num; in hns_roce_calc_hem_mhop()
124 mhop->hop_num = hr_dev->caps.cqc_hop_num; in hns_roce_calc_hem_mhop()
132 mhop->hop_num = hr_dev->caps.srqc_hop_num; in hns_roce_calc_hem_mhop()
140 mhop->hop_num = hr_dev->caps.mtt_hop_num; in hns_roce_calc_hem_mhop()
148 mhop->hop_num = hr_dev->caps.cqe_hop_num; in hns_roce_calc_hem_mhop()
163 bt_num = hns_roce_get_bt_num(table->type, mhop->hop_num); in hns_roce_calc_hem_mhop()
184 table->type, mhop->hop_num); in hns_roce_calc_hem_mhop()
373 u32 hop_num; in hns_roce_table_mhop_get() local
392 hop_num = mhop.hop_num; in hns_roce_table_mhop_get()
395 bt_num = hns_roce_get_bt_num(table->type, hop_num); in hns_roce_table_mhop_get()
412 table->type, hop_num); in hns_roce_table_mhop_get()
424 if ((check_whether_bt_num_3(table->type, hop_num) || in hns_roce_table_mhop_get()
425 check_whether_bt_num_2(table->type, hop_num)) && in hns_roce_table_mhop_get()
448 if (check_whether_bt_num_3(table->type, hop_num) && in hns_roce_table_mhop_get()
489 if (hop_num == 2) { in hns_roce_table_mhop_get()
492 } else if (hop_num == 1) { in hns_roce_table_mhop_get()
495 } else if (hop_num == HNS_ROCE_HOP_NUM_0) { in hns_roce_table_mhop_get()
508 } else if (hop_num == 2) { in hns_roce_table_mhop_get()
589 u32 hop_num; in hns_roce_table_mhop_put() local
601 hop_num = mhop.hop_num; in hns_roce_table_mhop_put()
604 bt_num = hns_roce_get_bt_num(table->type, hop_num); in hns_roce_table_mhop_put()
619 table->type, hop_num); in hns_roce_table_mhop_put()
630 if (table->type < HEM_TYPE_MTT && hop_num == 1) { in hns_roce_table_mhop_put()
633 } else if (table->type < HEM_TYPE_MTT && hop_num == 2) { in hns_roce_table_mhop_put()
637 hop_num == HNS_ROCE_HOP_NUM_0) { in hns_roce_table_mhop_put()
649 if (check_whether_bt_num_2(table->type, hop_num)) { in hns_roce_table_mhop_put()
662 } else if (check_whether_bt_num_3(table->type, hop_num)) { in hns_roce_table_mhop_put()
752 if (mhop.hop_num == 2) in hns_roce_table_find()
754 else if (mhop.hop_num == 1 || in hns_roce_table_find()
755 mhop.hop_num == HNS_ROCE_HOP_NUM_0) in hns_roce_table_find()
761 if (mhop.hop_num == 2) in hns_roce_table_find()
862 u32 hop_num; in hns_roce_init_hem_table() local
871 hop_num = hr_dev->caps.qpc_hop_num; in hns_roce_init_hem_table()
879 hop_num = hr_dev->caps.mpt_hop_num; in hns_roce_init_hem_table()
887 hop_num = hr_dev->caps.cqc_hop_num; in hns_roce_init_hem_table()
895 hop_num = hr_dev->caps.srqc_hop_num; in hns_roce_init_hem_table()
901 hop_num = hr_dev->caps.mtt_hop_num; in hns_roce_init_hem_table()
907 hop_num = hr_dev->caps.cqe_hop_num; in hns_roce_init_hem_table()
926 if (check_whether_bt_num_3(type, hop_num)) { in hns_roce_init_hem_table()
945 if (check_whether_bt_num_2(type, hop_num) || in hns_roce_init_hem_table()
946 check_whether_bt_num_3(type, hop_num)) { in hns_roce_init_hem_table()