Lines Matching refs:sge
78 struct rvt_sge sge; /* progress state for the current SGE */ member
96 rvt_put_mr(ss->sge.mr); in rvt_put_ss()
98 ss->sge = *ss->sg_list++; in rvt_put_ss()
102 static inline u32 rvt_get_sge_length(struct rvt_sge *sge, u32 length) in rvt_get_sge_length() argument
104 u32 len = sge->length; in rvt_get_sge_length()
108 if (len > sge->sge_length) in rvt_get_sge_length()
109 len = sge->sge_length; in rvt_get_sge_length()
117 struct rvt_sge *sge = &ss->sge; in rvt_update_sge() local
119 sge->vaddr += length; in rvt_update_sge()
120 sge->length -= length; in rvt_update_sge()
121 sge->sge_length -= length; in rvt_update_sge()
122 if (sge->sge_length == 0) { in rvt_update_sge()
124 rvt_put_mr(sge->mr); in rvt_update_sge()
126 *sge = *ss->sg_list++; in rvt_update_sge()
127 } else if (sge->length == 0 && sge->mr->lkey) { in rvt_update_sge()
128 if (++sge->n >= RVT_SEGSZ) { in rvt_update_sge()
129 if (++sge->m >= sge->mr->mapsz) in rvt_update_sge()
131 sge->n = 0; in rvt_update_sge()
133 sge->vaddr = sge->mr->map[sge->m]->segs[sge->n].vaddr; in rvt_update_sge()
134 sge->length = sge->mr->map[sge->m]->segs[sge->n].length; in rvt_update_sge()
141 struct rvt_sge *sge = &ss->sge; in rvt_skip_sge() local
144 u32 len = rvt_get_sge_length(sge, length); in rvt_skip_sge()