# A question about vring operation

- From: Wang, Wei W \<hidden\>
- Date: 2015-08-27 01:03:33 
- List: virtualization
- Page: https://ratatoskr.run/virtualization/2015/08/14630143
- Thread: https://ratatoskr.run/kvm/2015/08/14630143/t.md

```text
Hi all,

I have a question about the vring_avail:
It only includes an idx (equivalent to the ring tail), which is used by the frontend (virtio_net) to fill bufs. The backend (e.g. vhost_net) maintains the ring head (last_avail_idx) by itself. The frontend checks if the ring is full or empty via a counter (vq->num_free).
My question is why can't we include the ring head in the  vring_avail struct, so that the vq->num_free is not needed, and the backend can directly use it without maintaining its own copy?

Thanks,
Wei

```
