Lines Matching +full:0 +full:xa

22 #define REG_STATE_NEW		0x0
23 #define REG_STATE_REGISTERED 0x1
24 #define REG_STATE_UNREGISTERED 0x2
25 #define REG_STATE_UNUSED 0x3
29 #define MEM_ID_MAX 0xFFFE
51 const struct xdp_mem_allocator *xa = ptr; in xdp_mem_id_cmp() local
54 return xa->mem.id != mem_id; in xdp_mem_id_cmp()
71 struct xdp_mem_allocator *xa; in __xdp_mem_allocator_rcu_free() local
73 xa = container_of(rcu, struct xdp_mem_allocator, rcu); in __xdp_mem_allocator_rcu_free()
76 ida_simple_remove(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free()
78 kfree(xa); in __xdp_mem_allocator_rcu_free()
81 static void mem_xa_remove(struct xdp_mem_allocator *xa) in mem_xa_remove() argument
83 trace_mem_disconnect(xa); in mem_xa_remove()
85 if (!rhashtable_remove_fast(mem_id_ht, &xa->node, mem_id_rht_params)) in mem_xa_remove()
86 call_rcu(&xa->rcu, __xdp_mem_allocator_rcu_free); in mem_xa_remove()
91 struct xdp_mem_allocator *xa; in mem_allocator_disconnect() local
100 while ((xa = rhashtable_walk_next(&iter)) && !IS_ERR(xa)) { in mem_allocator_disconnect()
101 if (xa->allocator == allocator) in mem_allocator_disconnect()
102 mem_xa_remove(xa); in mem_allocator_disconnect()
107 } while (xa == ERR_PTR(-EAGAIN)); in mem_allocator_disconnect()
115 struct xdp_mem_allocator *xa; in xdp_rxq_info_unreg_mem_model() local
123 if (id == 0) in xdp_rxq_info_unreg_mem_model()
128 xa = rhashtable_lookup(mem_id_ht, &id, mem_id_rht_params); in xdp_rxq_info_unreg_mem_model()
129 page_pool_destroy(xa->page_pool); in xdp_rxq_info_unreg_mem_model()
149 xdp_rxq->mem.id = 0; in xdp_rxq_info_unreg()
150 xdp_rxq->mem.type = 0; in xdp_rxq_info_unreg()
156 memset(xdp_rxq, 0, sizeof(*xdp_rxq)); in xdp_rxq_info_init()
159 /* Returns 0 on success, negative on failure */
184 return 0; in xdp_rxq_info_reg()
206 return 0; in __mem_id_init_hash_table()
213 if (ret < 0) { in __mem_id_init_hash_table()
221 return 0; in __mem_id_init_hash_table()
236 if (id < 0) { in __mem_id_cyclic_get()
283 return 0; in xdp_rxq_info_reg_mem_model()
291 if (ret < 0) { in xdp_rxq_info_reg_mem_model()
303 if (id < 0) { in xdp_rxq_info_reg_mem_model()
315 xdp_rxq->mem.id = 0; in xdp_rxq_info_reg_mem_model()
326 return 0; in xdp_rxq_info_reg_mem_model()
343 struct xdp_mem_allocator *xa; in __xdp_return() local
350 xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params); in __xdp_return()
353 page_pool_put_full_page(xa->page_pool, page, napi_direct); in __xdp_return()
394 struct xdp_mem_allocator *xa; in __xdp_release_frame() local
398 xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params); in __xdp_release_frame()
400 if (xa) in __xdp_release_frame()
401 page_pool_release_page(xa->page_pool, page); in __xdp_release_frame()
424 metasize = xdp_data_meta_unsupported(xdp) ? 0 : in xdp_convert_zc_to_xdp_frame()
437 memset(xdpf, 0, sizeof(*xdpf)); in xdp_convert_zc_to_xdp_frame()
445 xdpf->headroom = 0; in xdp_convert_zc_to_xdp_frame()