Lines Matching refs:rdma
50 struct smb_extract_to_rdma *rdma);
2413 static bool smb_set_sge(struct smb_extract_to_rdma *rdma, in smb_set_sge() argument
2416 struct ib_sge *sge = &rdma->sge[rdma->nr_sge]; in smb_set_sge()
2419 addr = ib_dma_map_page(rdma->device, lowest_page, in smb_set_sge()
2420 off, len, rdma->direction); in smb_set_sge()
2421 if (ib_dma_mapping_error(rdma->device, addr)) in smb_set_sge()
2426 sge->lkey = rdma->local_dma_lkey; in smb_set_sge()
2427 rdma->nr_sge++; in smb_set_sge()
2436 struct smb_extract_to_rdma *rdma, in smb_extract_bvec_to_rdma() argument
2456 if (!smb_set_sge(rdma, bv[i].bv_page, off, len)) in smb_extract_bvec_to_rdma()
2461 if (rdma->nr_sge >= rdma->max_sge || maxsize <= 0) in smb_extract_bvec_to_rdma()
2475 struct smb_extract_to_rdma *rdma, in smb_extract_kvec_to_rdma() argument
2508 if (!smb_set_sge(rdma, page, off, seg)) in smb_extract_kvec_to_rdma()
2515 } while (len > 0 && rdma->nr_sge < rdma->max_sge); in smb_extract_kvec_to_rdma()
2517 if (rdma->nr_sge >= rdma->max_sge || maxsize <= 0) in smb_extract_kvec_to_rdma()
2530 struct smb_extract_to_rdma *rdma, in smb_extract_xarray_to_rdma() argument
2554 if (!smb_set_sge(rdma, folio_page(folio, 0), off, len)) { in smb_extract_xarray_to_rdma()
2561 if (rdma->nr_sge >= rdma->max_sge || maxsize <= 0) in smb_extract_xarray_to_rdma()
2581 struct smb_extract_to_rdma *rdma) in smb_extract_iter_to_rdma() argument
2584 int before = rdma->nr_sge; in smb_extract_iter_to_rdma()
2588 ret = smb_extract_bvec_to_rdma(iter, rdma, len); in smb_extract_iter_to_rdma()
2591 ret = smb_extract_kvec_to_rdma(iter, rdma, len); in smb_extract_iter_to_rdma()
2594 ret = smb_extract_xarray_to_rdma(iter, rdma, len); in smb_extract_iter_to_rdma()
2604 while (rdma->nr_sge > before) { in smb_extract_iter_to_rdma()
2605 struct ib_sge *sge = &rdma->sge[rdma->nr_sge--]; in smb_extract_iter_to_rdma()
2607 ib_dma_unmap_single(rdma->device, sge->addr, sge->length, in smb_extract_iter_to_rdma()
2608 rdma->direction); in smb_extract_iter_to_rdma()