Lines Matching refs:hem_idx
376 u64 hem_idx; in hns_roce_table_mhop_get() local
398 hem_idx = mhop.l0_idx * chunk_ba_num * chunk_ba_num + in hns_roce_table_mhop_get()
404 hem_idx = mhop.l0_idx * chunk_ba_num + mhop.l1_idx; in hns_roce_table_mhop_get()
408 hem_idx = mhop.l0_idx; in hns_roce_table_mhop_get()
418 if (table->hem[hem_idx]) { in hns_roce_table_mhop_get()
419 ++table->hem[hem_idx]->refcount; in hns_roce_table_mhop_get()
475 table->hem[hem_idx] = hns_roce_alloc_hem(hr_dev, in hns_roce_table_mhop_get()
480 if (!table->hem[hem_idx]) { in hns_roce_table_mhop_get()
485 hns_roce_hem_first(table->hem[hem_idx], &iter); in hns_roce_table_mhop_get()
512 ++table->hem[hem_idx]->refcount; in hns_roce_table_mhop_get()
592 u64 hem_idx; in hns_roce_table_mhop_put() local
607 hem_idx = mhop.l0_idx * chunk_ba_num * chunk_ba_num + in hns_roce_table_mhop_put()
612 hem_idx = mhop.l0_idx * chunk_ba_num + mhop.l1_idx; in hns_roce_table_mhop_put()
615 hem_idx = mhop.l0_idx; in hns_roce_table_mhop_put()
625 if (check_refcount && (--table->hem[hem_idx]->refcount > 0)) { in hns_roce_table_mhop_put()
646 hns_roce_free_hem(hr_dev, table->hem[hem_idx]); in hns_roce_table_mhop_put()
647 table->hem[hem_idx] = NULL; in hns_roce_table_mhop_put()
735 u32 hem_idx = 0; in hns_roce_table_find() local
753 hem_idx = i * (mhop.bt_chunk_size / 8) + j; in hns_roce_table_find()
756 hem_idx = i; in hns_roce_table_find()
758 hem = table->hem[hem_idx]; in hns_roce_table_find()