Lines Matching refs:length
171 void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length) in ipath_copy_sge() argument
175 while (length) { in ipath_copy_sge()
176 u32 len = sge->length; in ipath_copy_sge()
178 if (len > length) in ipath_copy_sge()
179 len = length; in ipath_copy_sge()
185 sge->length -= len; in ipath_copy_sge()
190 } else if (sge->length == 0 && sge->mr != NULL) { in ipath_copy_sge()
198 sge->length = in ipath_copy_sge()
199 sge->mr->map[sge->m]->segs[sge->n].length; in ipath_copy_sge()
202 length -= len; in ipath_copy_sge()
211 void ipath_skip_sge(struct ipath_sge_state *ss, u32 length) in ipath_skip_sge() argument
215 while (length) { in ipath_skip_sge()
216 u32 len = sge->length; in ipath_skip_sge()
218 if (len > length) in ipath_skip_sge()
219 len = length; in ipath_skip_sge()
224 sge->length -= len; in ipath_skip_sge()
229 } else if (sge->length == 0 && sge->mr != NULL) { in ipath_skip_sge()
237 sge->length = in ipath_skip_sge()
238 sge->mr->map[sge->m]->segs[sge->n].length; in ipath_skip_sge()
240 length -= len; in ipath_skip_sge()
249 static u32 ipath_count_sge(struct ipath_sge_state *ss, u32 length) in ipath_count_sge() argument
256 while (length) { in ipath_count_sge()
257 u32 len = sge.length; in ipath_count_sge()
259 if (len > length) in ipath_count_sge()
260 len = length; in ipath_count_sge()
265 (len != length && (len & (sizeof(u32) - 1)))) { in ipath_count_sge()
271 sge.length -= len; in ipath_count_sge()
276 } else if (sge.length == 0 && sge.mr != NULL) { in ipath_count_sge()
284 sge.length = in ipath_count_sge()
285 sge.mr->map[sge.m]->segs[sge.n].length; in ipath_count_sge()
287 length -= len; in ipath_count_sge()
296 u32 length) in ipath_copy_from_sge() argument
300 while (length) { in ipath_copy_from_sge()
301 u32 len = sge->length; in ipath_copy_from_sge()
303 if (len > length) in ipath_copy_from_sge()
304 len = length; in ipath_copy_from_sge()
310 sge->length -= len; in ipath_copy_from_sge()
315 } else if (sge->length == 0 && sge->mr != NULL) { in ipath_copy_from_sge()
323 sge->length = in ipath_copy_from_sge()
324 sge->mr->map[sge->m]->segs[sge->n].length; in ipath_copy_from_sge()
327 length -= len; in ipath_copy_from_sge()
383 wr->sg_list[0].length < sizeof(u64) || in ipath_post_one_send()
399 wqe->length = 0; in ipath_post_one_send()
404 u32 length = wr->sg_list[i].length; in ipath_post_one_send() local
407 if (length == 0) in ipath_post_one_send()
413 wqe->length += length; in ipath_post_one_send()
420 if (wqe->length > 0x80000000U) in ipath_post_one_send()
422 } else if (wqe->length > to_idev(qp->ibqp.device)->dd->ipath_ibmtu) in ipath_post_one_send()
780 static void update_sge(struct ipath_sge_state *ss, u32 length) in update_sge() argument
784 sge->vaddr += length; in update_sge()
785 sge->length -= length; in update_sge()
786 sge->sge_length -= length; in update_sge()
790 } else if (sge->length == 0 && sge->mr != NULL) { in update_sge()
797 sge->length = sge->mr->map[sge->m]->segs[sge->n].length; in update_sge()
838 u32 length, unsigned flush_wc) in copy_io() argument
845 u32 len = ss->sge.length; in copy_io()
848 if (len > length) in copy_io()
849 len = length; in copy_io()
868 if (len == length) { in copy_io()
879 if (len == length) { in copy_io()
911 if (len == length) { in copy_io()
923 if (len == length) { in copy_io()
929 } else if (len == length) { in copy_io()
933 } else if (len == length) { in copy_io()
960 length -= len; in copy_io()
963 update_sge(ss, length); in copy_io()
1285 if (likely(ss->num_sge == 1 && len <= ss->sge.length && in ipath_verbs_send_pio()