Lines Matching refs:rt
25 struct rdma_restrack_root *rt; in rdma_restrack_init() local
28 dev->res = kcalloc(RDMA_RESTRACK_MAX, sizeof(*rt), GFP_KERNEL); in rdma_restrack_init()
32 rt = dev->res; in rdma_restrack_init()
35 xa_init_flags(&rt[i].xa, XA_FLAGS_ALLOC); in rdma_restrack_init()
46 struct rdma_restrack_root *rt = dev->res; in rdma_restrack_clean() local
55 kfree(rt); in rdma_restrack_clean()
67 struct rdma_restrack_root *rt = &dev->res[type]; in rdma_restrack_count() local
69 XA_STATE(xas, &rt->xa, 0); in rdma_restrack_count()
72 xa_lock(&rt->xa); in rdma_restrack_count()
74 if (xa_get_mark(&rt->xa, e->id, RESTRACK_DD) && !show_details) in rdma_restrack_count()
78 xa_unlock(&rt->xa); in rdma_restrack_count()
184 struct rdma_restrack_root *rt; in rdma_restrack_add() local
193 rt = &dev->res[res->type]; in rdma_restrack_add()
205 ret = xa_insert(&rt->xa, res->id, res, GFP_KERNEL); in rdma_restrack_add()
210 xa_set_mark(&rt->xa, res->id, RESTRACK_DD); in rdma_restrack_add()
216 ret = xa_insert(&rt->xa, counter->id, res, GFP_KERNEL); in rdma_restrack_add()
219 ret = xa_alloc_cyclic(&rt->xa, &res->id, res, xa_limit_32b, in rdma_restrack_add()
220 &rt->next_id, GFP_KERNEL); in rdma_restrack_add()
248 struct rdma_restrack_root *rt = &dev->res[type]; in rdma_restrack_get_byid() local
251 xa_lock(&rt->xa); in rdma_restrack_get_byid()
252 res = xa_load(&rt->xa, id); in rdma_restrack_get_byid()
255 xa_unlock(&rt->xa); in rdma_restrack_get_byid()
286 struct rdma_restrack_root *rt; in rdma_restrack_del() local
304 rt = &dev->res[res->type]; in rdma_restrack_del()
306 old = xa_erase(&rt->xa, res->id); in rdma_restrack_del()