Lines Matching refs:sge
43 struct siw_sge *sge = &wqe->sqe.sge[0]; in siw_try_1seg() local
44 u32 bytes = sge->length; in siw_try_1seg()
53 memcpy(paddr, &wqe->sqe.sge[1], bytes); in siw_try_1seg()
59 memcpy(paddr, ib_virt_dma_to_ptr(sge->laddr), bytes); in siw_try_1seg()
61 if (copy_from_user(paddr, u64_to_user_ptr(sge->laddr), in siw_try_1seg()
65 unsigned int off = sge->laddr & ~PAGE_MASK; in siw_try_1seg()
71 p = siw_get_upage(mem->umem, sge->laddr); in siw_try_1seg()
73 p = siw_get_pblpage(mem, sge->laddr, &pbl_idx); in siw_try_1seg()
90 sge->laddr + part); in siw_try_1seg()
93 sge->laddr + part, in siw_try_1seg()
136 c_tx->pkt.rreq.sink_stag = htonl(wqe->sqe.sge[0].lkey); in siw_qp_prepare_tx()
138 cpu_to_be64(wqe->sqe.sge[0].laddr); in siw_qp_prepare_tx()
141 c_tx->pkt.rreq.read_size = htonl(wqe->sqe.sge[0].length); in siw_qp_prepare_tx()
377 struct siw_sge *sge, unsigned int offset, in siw_0copy_tx() argument
381 int sge_bytes = min(sge->length - offset, size); in siw_0copy_tx()
383 offset = (sge->laddr + offset) & ~PAGE_MASK; in siw_0copy_tx()
393 sge++; in siw_0copy_tx()
394 sge_bytes = min(sge->length, size - sent); in siw_0copy_tx()
395 offset = sge->laddr & ~PAGE_MASK; in siw_0copy_tx()
441 struct siw_sge *sge = &wqe->sqe.sge[c_tx->sge_idx]; in siw_tx_hdt() local
471 unsigned int sge_len = min(sge->length - sge_off, data_len); in siw_tx_hdt()
472 unsigned int fp_off = (sge->laddr + sge_off) & ~PAGE_MASK; in siw_tx_hdt()
487 ib_virt_dma_to_ptr(sge->laddr + sge_off); in siw_tx_hdt()
509 mem, sge->laddr + sge_off, in siw_tx_hdt()
513 sge->laddr + sge_off); in siw_tx_hdt()
547 u64 va = sge->laddr + sge_off; in siw_tx_hdt()
572 if (sge_off == sge->length && in siw_tx_hdt()
575 sge++; in siw_tx_hdt()
603 rv = siw_0copy_tx(s, page_array, &wqe->sqe.sge[c_tx->sge_idx], in siw_tx_hdt()
661 sge = &wqe->sqe.sge[c_tx->sge_idx]; in siw_tx_hdt()
662 sge_unsent = sge->length - c_tx->sge_off; in siw_tx_hdt()
668 sge++; in siw_tx_hdt()
669 sge_unsent = sge->length; in siw_tx_hdt()
775 struct siw_sge *sge = &wqe->sqe.sge[0]; in siw_check_sgl_tx() local
781 for (i = 0, len = 0; num_sge; num_sge--, i++, sge++) { in siw_check_sgl_tx()
785 if (sge->length) { in siw_check_sgl_tx()
786 int rv = siw_check_sge(pd, sge, &wqe->mem[i], perms, 0, in siw_check_sgl_tx()
787 sge->length); in siw_check_sgl_tx()
792 len += sge->length; in siw_check_sgl_tx()
840 wqe->bytes = wqe->sqe.sge[0].length; in siw_qp_sq_proc_tx()
846 wqe->sqe.sge[0].laddr = in siw_qp_sq_proc_tx()
847 (u64)(uintptr_t)&wqe->sqe.sge[1]; in siw_qp_sq_proc_tx()