Lines Matching refs:frag
159 struct rds_page_frag *frag; in rds_ib_recv_free_caches() local
178 list_for_each_entry_safe(frag, frag_tmp, &list, f_cache_entry) { in rds_ib_recv_free_caches()
179 list_del(&frag->f_cache_entry); in rds_ib_recv_free_caches()
180 WARN_ON(!list_empty(&frag->f_item)); in rds_ib_recv_free_caches()
181 kmem_cache_free(rds_ib_frag_slab, frag); in rds_ib_recv_free_caches()
193 struct rds_page_frag *frag) in rds_ib_frag_free() argument
195 rdsdebug("frag %p page %p\n", frag, sg_page(&frag->f_sg)); in rds_ib_frag_free()
197 rds_ib_recv_cache_put(&frag->f_cache_entry, &ic->i_cache_frags); in rds_ib_frag_free()
206 struct rds_page_frag *frag; in rds_ib_inc_free() local
213 list_for_each_entry_safe(frag, pos, &ibinc->ii_frags, f_item) { in rds_ib_inc_free()
214 list_del_init(&frag->f_item); in rds_ib_inc_free()
215 rds_ib_frag_free(ic, frag); in rds_ib_inc_free()
278 struct rds_page_frag *frag; in rds_ib_refill_one_frag() local
284 frag = container_of(cache_item, struct rds_page_frag, f_cache_entry); in rds_ib_refill_one_frag()
288 frag = kmem_cache_alloc(rds_ib_frag_slab, slab_mask); in rds_ib_refill_one_frag()
289 if (!frag) in rds_ib_refill_one_frag()
292 sg_init_table(&frag->f_sg, 1); in rds_ib_refill_one_frag()
293 ret = rds_page_remainder_alloc(&frag->f_sg, in rds_ib_refill_one_frag()
296 kmem_cache_free(rds_ib_frag_slab, frag); in rds_ib_refill_one_frag()
302 INIT_LIST_HEAD(&frag->f_item); in rds_ib_refill_one_frag()
304 return frag; in rds_ib_refill_one_frag()
535 struct rds_page_frag *frag; in rds_ib_inc_copy_to_user() local
543 frag = list_entry(ibinc->ii_frags.next, struct rds_page_frag, f_item); in rds_ib_inc_copy_to_user()
548 frag = list_entry(frag->f_item.next, in rds_ib_inc_copy_to_user()
558 ret = copy_page_to_iter(sg_page(&frag->f_sg), in rds_ib_inc_copy_to_user()
559 frag->f_sg.offset + frag_off, in rds_ib_inc_copy_to_user()
788 struct rds_page_frag *frag; in rds_ib_cong_recv() local
803 frag = list_entry(ibinc->ii_frags.next, struct rds_page_frag, f_item); in rds_ib_cong_recv()
815 addr = kmap_atomic(sg_page(&frag->f_sg)); in rds_ib_cong_recv()
817 src = addr + frag->f_sg.offset + frag_off; in rds_ib_cong_recv()
837 frag = list_entry(frag->f_item.next, in rds_ib_cong_recv()