Lines Matching +full:0 +full:xa

21  * Return: 0 on success
34 for (i = 0; i < RDMA_RESTRACK_MAX; i++) in rdma_restrack_init()
35 xa_init_flags(&rt[i].xa, XA_FLAGS_ALLOC); in rdma_restrack_init()
37 return 0; in rdma_restrack_init()
49 for (i = 0 ; i < RDMA_RESTRACK_MAX; i++) { in rdma_restrack_clean()
50 struct xarray *xa = &dev->res[i].xa; in rdma_restrack_clean() local
52 WARN_ON(!xa_empty(xa)); in rdma_restrack_clean()
53 xa_destroy(xa); in rdma_restrack_clean()
69 XA_STATE(xas, &rt->xa, 0); in rdma_restrack_count()
70 u32 cnt = 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()
183 int ret = 0; in rdma_restrack_add()
198 "QP number 0x%0X and port 0x%0X", qp->qp_num, in rdma_restrack_add()
203 ret = xa_insert(&rt->xa, res->id, res, GFP_KERNEL); in rdma_restrack_add()
205 res->id = 0; in rdma_restrack_add()
208 xa_set_mark(&rt->xa, res->id, RESTRACK_DD); in rdma_restrack_add()
214 ret = xa_insert(&rt->xa, counter->id, res, GFP_KERNEL); in rdma_restrack_add()
215 res->id = ret ? 0 : counter->id; in rdma_restrack_add()
217 ret = xa_alloc_cyclic(&rt->xa, &res->id, res, xa_limit_32b, in rdma_restrack_add()
219 ret = (ret < 0) ? ret : 0; in rdma_restrack_add()
249 xa_lock(&rt->xa); in rdma_restrack_get_byid()
250 res = xa_load(&rt->xa, id); in rdma_restrack_get_byid()
253 xa_unlock(&rt->xa); in rdma_restrack_get_byid()
304 old = xa_erase(&rt->xa, res->id); in rdma_restrack_del()