Lines Matching refs:id
45 BUILD_BUG_ON(sizeof_field(struct xdp_mem_allocator, mem.id) in xdp_mem_id_hashfn()
58 return xa->mem.id != mem_id; in xdp_mem_id_cmp()
64 .key_offset = offsetof(struct xdp_mem_allocator, mem.id),
65 .key_len = sizeof_field(struct xdp_mem_allocator, mem.id),
80 ida_free(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free()
121 int id = mem->id; in xdp_unreg_mem_model() local
124 mem->id = 0; in xdp_unreg_mem_model()
127 if (id == 0) in xdp_unreg_mem_model()
131 xa = rhashtable_lookup_fast(mem_id_ht, &id, mem_id_rht_params); in xdp_unreg_mem_model()
241 int id; in __mem_id_cyclic_get() local
244 id = ida_alloc_range(&mem_id_pool, mem_id_next, MEM_ID_MAX - 1, gfp); in __mem_id_cyclic_get()
245 if (id < 0) { in __mem_id_cyclic_get()
246 if (id == -ENOSPC) { in __mem_id_cyclic_get()
253 return id; /* errno */ in __mem_id_cyclic_get()
255 mem_id_next = id + 1; in __mem_id_cyclic_get()
257 return id; in __mem_id_cyclic_get()
277 int id, errno, ret; in __xdp_reg_mem_model() local
305 id = __mem_id_cyclic_get(gfp); in __xdp_reg_mem_model()
306 if (id < 0) { in __xdp_reg_mem_model()
307 errno = id; in __xdp_reg_mem_model()
310 mem->id = id; in __xdp_reg_mem_model()
315 ptr = rhashtable_insert_slow(mem_id_ht, &id, &xdp_alloc->node); in __xdp_reg_mem_model()
317 ida_free(&mem_id_pool, mem->id); in __xdp_reg_mem_model()
318 mem->id = 0; in __xdp_reg_mem_model()
400 .id = pool->xdp_mem_id, in xdp_unreg_page_pool()
420 .id = pool->xdp_mem_id, in xdp_rxq_info_attach_page_pool()
983 u32 bpf_xdp_metadata_kfunc_id(int id) in BTF_ID_LIST()
986 return xdp_metadata_kfunc_ids_unsorted[id]; in BTF_ID_LIST()