• Home
  • Raw
  • Download

Lines Matching refs:subbuf_size

571 			 size_t subbuf_size,  in relay_open()  argument
579 if (!(subbuf_size && n_subbufs)) in relay_open()
581 if (subbuf_size > UINT_MAX / n_subbufs) in relay_open()
590 chan->subbuf_size = subbuf_size; in relay_open()
591 chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs); in relay_open()
727 if (unlikely(length > buf->chan->subbuf_size)) in relay_switch_subbuf()
730 if (buf->offset != buf->chan->subbuf_size + 1) { in relay_switch_subbuf()
731 buf->prev_padding = buf->chan->subbuf_size - buf->offset; in relay_switch_subbuf()
737 buf->chan->subbuf_size - in relay_switch_subbuf()
740 buf->early_bytes += buf->chan->subbuf_size - in relay_switch_subbuf()
755 new = buf->start + new_subbuf * buf->chan->subbuf_size; in relay_switch_subbuf()
758 buf->offset = buf->chan->subbuf_size + 1; in relay_switch_subbuf()
764 if (unlikely(length + buf->offset > buf->chan->subbuf_size)) in relay_switch_subbuf()
833 chan->last_toobig, chan->subbuf_size); in relay_close()
943 size_t subbuf_size = buf->chan->subbuf_size; in relay_file_read_consume() local
951 if (buf->bytes_consumed + bytes_consumed > subbuf_size) { in relay_file_read_consume()
960 read_subbuf = read_pos / buf->chan->subbuf_size; in relay_file_read_consume()
961 if (buf->bytes_consumed + buf->padding[read_subbuf] == subbuf_size) { in relay_file_read_consume()
963 (buf->offset == subbuf_size)) in relay_file_read_consume()
975 size_t subbuf_size = buf->chan->subbuf_size; in relay_file_read_avail() local
984 if (unlikely(buf->offset > subbuf_size)) { in relay_file_read_avail()
996 produced = (produced % n_subbufs) * subbuf_size + buf->offset; in relay_file_read_avail()
997 consumed = (consumed % n_subbufs) * subbuf_size + buf->bytes_consumed; in relay_file_read_avail()
1000 produced += n_subbufs * subbuf_size; in relay_file_read_avail()
1003 if (buf->offset == subbuf_size && in relay_file_read_avail()
1022 size_t subbuf_size = buf->chan->subbuf_size; in relay_file_read_subbuf_avail() local
1024 write_subbuf = (buf->data - buf->start) / subbuf_size; in relay_file_read_subbuf_avail()
1025 write_offset = buf->offset > subbuf_size ? subbuf_size : buf->offset; in relay_file_read_subbuf_avail()
1026 read_subbuf = read_pos / subbuf_size; in relay_file_read_subbuf_avail()
1027 read_offset = read_pos % subbuf_size; in relay_file_read_subbuf_avail()
1034 avail = (subbuf_size - padding) - read_offset; in relay_file_read_subbuf_avail()
1052 size_t subbuf_size = buf->chan->subbuf_size; in relay_file_read_start_pos() local
1057 read_pos = consumed * subbuf_size + buf->bytes_consumed; in relay_file_read_start_pos()
1058 read_subbuf = read_pos / subbuf_size; in relay_file_read_start_pos()
1060 padding_start = (read_subbuf + 1) * subbuf_size - padding; in relay_file_read_start_pos()
1061 padding_end = (read_subbuf + 1) * subbuf_size; in relay_file_read_start_pos()
1064 read_pos = read_subbuf * subbuf_size; in relay_file_read_start_pos()
1081 size_t subbuf_size = buf->chan->subbuf_size; in relay_file_read_end_pos() local
1084 read_subbuf = read_pos / subbuf_size; in relay_file_read_end_pos()
1086 if (read_pos % subbuf_size + count + padding == subbuf_size) in relay_file_read_end_pos()
1087 end_pos = (read_subbuf + 1) * subbuf_size; in relay_file_read_end_pos()
1090 if (end_pos >= subbuf_size * n_subbufs) in relay_file_read_end_pos()
1181 if (rbuf->bytes_consumed >= rbuf->chan->subbuf_size) { in relay_consume_bytes()
1183 rbuf->bytes_consumed %= rbuf->chan->subbuf_size; in relay_consume_bytes()
1222 unsigned int subbuf_size = rbuf->chan->subbuf_size; in subbuf_splice_actor() local
1226 size_t read_subbuf = read_start / subbuf_size; in subbuf_splice_actor()
1228 size_t nonpad_end = read_subbuf * subbuf_size + subbuf_size - padding; in subbuf_splice_actor()
1250 if (len > (subbuf_size - read_start % subbuf_size)) in subbuf_splice_actor()
1251 len = subbuf_size - read_start % subbuf_size; in subbuf_splice_actor()