Lines Matching refs:mem
41 BUILD_BUG_ON(sizeof_field(struct xdp_mem_allocator, mem.id) in xdp_mem_id_hashfn()
54 return xa->mem.id != mem_id; in xdp_mem_id_cmp()
60 .key_offset = offsetof(struct xdp_mem_allocator, mem.id),
61 .key_len = sizeof_field(struct xdp_mem_allocator, mem.id),
76 ida_simple_remove(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free()
116 int id = xdp_rxq->mem.id; in xdp_rxq_info_unreg_mem_model()
126 if (xdp_rxq->mem.type == MEM_TYPE_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()
278 xdp_rxq->mem.type = type; in xdp_rxq_info_reg_mem_model()
307 xdp_rxq->mem.id = id; in xdp_rxq_info_reg_mem_model()
308 xdp_alloc->mem = xdp_rxq->mem; in xdp_rxq_info_reg_mem_model()
314 ida_simple_remove(&mem_id_pool, xdp_rxq->mem.id); in xdp_rxq_info_reg_mem_model()
315 xdp_rxq->mem.id = 0; in xdp_rxq_info_reg_mem_model()
340 static void __xdp_return(void *data, struct xdp_mem_info *mem, bool napi_direct, in __xdp_return() argument
346 switch (mem->type) { in __xdp_return()
350 xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params); in __xdp_return()
370 WARN(1, "Incorrect XDP memory type (%d) usage", mem->type); in __xdp_return()
377 __xdp_return(xdpf->data, &xdpf->mem, false, NULL); in xdp_return_frame()
383 __xdp_return(xdpf->data, &xdpf->mem, true, NULL); in xdp_return_frame_rx_napi()
389 __xdp_return(xdp->data, &xdp->rxq->mem, true, xdp); in xdp_return_buff()
393 void __xdp_release_frame(void *data, struct xdp_mem_info *mem) in __xdp_release_frame() argument
399 xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params); in __xdp_release_frame()
449 xdpf->mem.type = MEM_TYPE_PAGE_ORDER0; in xdp_convert_zc_to_xdp_frame()