Lines Matching refs:cur
351 static void iovec_cur_init(struct iovec_cur *cur, in iovec_cur_init() argument
355 cur->iovec = iovec; in iovec_cur_init()
356 cur->num_iovec = num_iovec; in iovec_cur_init()
357 cur->idx = 0; in iovec_cur_init()
358 cur->byte_off = 0; in iovec_cur_init()
359 cur->bytes_remaining = iovec_total_bytes(iovec, num_iovec); in iovec_cur_init()
368 static size_t iovec_cur_get_buffer(struct iovec_cur *cur, in iovec_cur_get_buffer() argument
380 if (cur->idx >= cur->num_iovec) in iovec_cur_get_buffer()
383 l = cur->iovec[cur->idx].buf_len - cur->byte_off; in iovec_cur_get_buffer()
388 *buf = cur->iovec[cur->idx].buf + cur->byte_off; in iovec_cur_get_buffer()
389 cur->byte_off += l; in iovec_cur_get_buffer()
390 cur->bytes_remaining -= l; in iovec_cur_get_buffer()
398 ++cur->idx; in iovec_cur_get_buffer()
399 cur->byte_off = 0; in iovec_cur_get_buffer()
488 static int qtx_encrypt_into_txe(OSSL_QTX *qtx, struct iovec_cur *cur, TXE *txe, in qtx_encrypt_into_txe() argument
554 src_len = iovec_cur_get_buffer(cur, &src, SIZE_MAX); in qtx_encrypt_into_txe()
606 struct iovec_cur cur; in qtx_write() local
639 iovec_cur_init(&cur, iovec, num_iovec); in qtx_write()
641 if (cur.bytes_remaining == 0) { in qtx_write()
650 cur.bytes_remaining, in qtx_write()
653 payload_len = cur.bytes_remaining; in qtx_write()
699 src_len = iovec_cur_get_buffer(&cur, &src, SIZE_MAX); in qtx_write()
708 if (!qtx_encrypt_into_txe(qtx, &cur, txe, enc_level, pkt->pn, in qtx_write()