Lines Matching refs:sge
492 rval = rvt_mr_has_lkey(ss->sge.mr, lkey); in rvt_ss_has_lkey()
682 struct ib_sge *sge) in rvt_sge_adjacent() argument
684 if (last_sge && sge->lkey == last_sge->mr->lkey && in rvt_sge_adjacent()
685 ((uint64_t)(last_sge->vaddr + last_sge->length) == sge->addr)) { in rvt_sge_adjacent()
686 if (sge->lkey) { in rvt_sge_adjacent()
687 if (unlikely((sge->addr - last_sge->mr->user_base + in rvt_sge_adjacent()
688 sge->length > last_sge->mr->length))) in rvt_sge_adjacent()
691 last_sge->length += sge->length; in rvt_sge_adjacent()
693 last_sge->sge_length += sge->length; in rvt_sge_adjacent()
694 trace_rvt_sge_adjacent(last_sge, sge); in rvt_sge_adjacent()
718 struct ib_sge *sge, int acc) in rvt_lkey_ok() argument
728 if (sge->lkey == 0) { in rvt_lkey_ok()
733 if (rvt_sge_adjacent(last_sge, sge)) in rvt_lkey_ok()
743 isge->vaddr = (void *)sge->addr; in rvt_lkey_ok()
744 isge->length = sge->length; in rvt_lkey_ok()
745 isge->sge_length = sge->length; in rvt_lkey_ok()
750 if (rvt_sge_adjacent(last_sge, sge)) in rvt_lkey_ok()
753 mr = rcu_dereference(rkt->table[sge->lkey >> rkt->shift]); in rvt_lkey_ok()
761 mr->lkey != sge->lkey || mr->pd != &pd->ibpd)) in rvt_lkey_ok()
764 off = sge->addr - mr->user_base; in rvt_lkey_ok()
765 if (unlikely(sge->addr < mr->user_base || in rvt_lkey_ok()
766 off + sge->length > mr->length || in rvt_lkey_ok()
799 isge->sge_length = sge->length; in rvt_lkey_ok()
803 trace_rvt_sge_new(isge, sge); in rvt_lkey_ok()
826 int rvt_rkey_ok(struct rvt_qp *qp, struct rvt_sge *sge, in rvt_rkey_ok() argument
852 sge->mr = mr; in rvt_rkey_ok()
853 sge->vaddr = (void *)vaddr; in rvt_rkey_ok()
854 sge->length = len; in rvt_rkey_ok()
855 sge->sge_length = len; in rvt_rkey_ok()
856 sge->m = 0; in rvt_rkey_ok()
857 sge->n = 0; in rvt_rkey_ok()
903 sge->mr = mr; in rvt_rkey_ok()
904 sge->vaddr = mr->map[m]->segs[n].vaddr + off; in rvt_rkey_ok()
905 sge->length = mr->map[m]->segs[n].length - off; in rvt_rkey_ok()
906 sge->sge_length = len; in rvt_rkey_ok()
907 sge->m = m; in rvt_rkey_ok()
908 sge->n = n; in rvt_rkey_ok()