• Home
  • Raw
  • Download

Lines Matching refs:rbi

52 	struct hv_ring_buffer_info *rbi = &channel->outbound;  in hv_signal_on_write()  local
55 if (READ_ONCE(rbi->ring_buffer->interrupt_mask)) in hv_signal_on_write()
64 if (old_write == READ_ONCE(rbi->ring_buffer->read_index)) { in hv_signal_on_write()
140 hv_get_ringbuffer_availbytes(const struct hv_ring_buffer_info *rbi, in hv_get_ringbuffer_availbytes() argument
146 read_loc = READ_ONCE(rbi->ring_buffer->read_index); in hv_get_ringbuffer_availbytes()
147 write_loc = READ_ONCE(rbi->ring_buffer->write_index); in hv_get_ringbuffer_availbytes()
148 dsize = rbi->ring_datasize; in hv_get_ringbuffer_availbytes()
378 static u32 hv_pkt_iter_avail(const struct hv_ring_buffer_info *rbi) in hv_pkt_iter_avail() argument
380 u32 priv_read_loc = rbi->priv_read_index; in hv_pkt_iter_avail()
381 u32 write_loc = READ_ONCE(rbi->ring_buffer->write_index); in hv_pkt_iter_avail()
386 return (rbi->ring_datasize - priv_read_loc) + write_loc; in hv_pkt_iter_avail()
396 struct hv_ring_buffer_info *rbi = &channel->inbound; in hv_pkt_iter_first() local
400 if (hv_pkt_iter_avail(rbi) < sizeof(struct vmpacket_descriptor)) in hv_pkt_iter_first()
403 desc = hv_get_ring_buffer(rbi) + rbi->priv_read_index; in hv_pkt_iter_first()
421 struct hv_ring_buffer_info *rbi = &channel->inbound; in __hv_pkt_iter_next() local
423 u32 dsize = rbi->ring_datasize; in __hv_pkt_iter_next()
427 rbi->priv_read_index += packetlen + VMBUS_PKT_TRAILER; in __hv_pkt_iter_next()
428 if (rbi->priv_read_index >= dsize) in __hv_pkt_iter_next()
429 rbi->priv_read_index -= dsize; in __hv_pkt_iter_next()
437 static u32 hv_pkt_iter_bytes_read(const struct hv_ring_buffer_info *rbi, in hv_pkt_iter_bytes_read() argument
440 if (rbi->priv_read_index >= start_read_index) in hv_pkt_iter_bytes_read()
441 return rbi->priv_read_index - start_read_index; in hv_pkt_iter_bytes_read()
443 return rbi->ring_datasize - start_read_index + in hv_pkt_iter_bytes_read()
444 rbi->priv_read_index; in hv_pkt_iter_bytes_read()
469 struct hv_ring_buffer_info *rbi = &channel->inbound; in hv_pkt_iter_close() local
478 start_read_index = rbi->ring_buffer->read_index; in hv_pkt_iter_close()
479 rbi->ring_buffer->read_index = rbi->priv_read_index; in hv_pkt_iter_close()
486 if (!rbi->ring_buffer->feature_bits.feat_pending_send_sz) in hv_pkt_iter_close()
505 pending_sz = READ_ONCE(rbi->ring_buffer->pending_send_sz); in hv_pkt_iter_close()
514 curr_write_sz = hv_get_bytes_to_write(rbi); in hv_pkt_iter_close()
515 bytes_read = hv_pkt_iter_bytes_read(rbi, start_read_index); in hv_pkt_iter_close()