Lines Matching refs:npgs
28 unpin_user_pages_dirty_lock(umem->pgs, umem->npgs, true); in xdp_umem_unpin_pages()
37 atomic_long_sub(umem->npgs, &umem->user->locked_vm); in xdp_umem_unaccount_pages()
99 long npgs; in xdp_umem_pin_pages() local
102 umem->pgs = kvcalloc(umem->npgs, sizeof(*umem->pgs), GFP_KERNEL | __GFP_NOWARN); in xdp_umem_pin_pages()
107 npgs = pin_user_pages(address, umem->npgs, in xdp_umem_pin_pages()
111 if (npgs != umem->npgs) { in xdp_umem_pin_pages()
112 if (npgs >= 0) { in xdp_umem_pin_pages()
113 umem->npgs = npgs; in xdp_umem_pin_pages()
117 err = npgs; in xdp_umem_pin_pages()
142 new_npgs = old_npgs + umem->npgs; in xdp_umem_account_pages()
157 u64 npgs, addr = mr->addr, size = mr->len; in xdp_umem_reg() local
187 npgs = div_u64_rem(size, PAGE_SIZE, &npgs_rem); in xdp_umem_reg()
189 npgs++; in xdp_umem_reg()
190 if (npgs > U32_MAX) in xdp_umem_reg()
207 umem->npgs = (u32)npgs; in xdp_umem_reg()
223 err = xdp_umem_addr_map(umem, umem->pgs, umem->npgs); in xdp_umem_reg()