On Fri, May 17, 2019 at 05:06:09PM +0200, Maxime Coquelin wrote:
[...]
> +void
> +__vhost_log_cache_write(struct virtio_net *dev, struct vhost_virtqueue *vq,
> + uint64_t addr, uint64_t len)
> +{
> + uint64_t page;
> +
> + if (unlikely(!dev->log_base || !len))
> + return;
> +
> + if (unlikely(dev->log_size <= ((addr + len - 1) / VHOST_LOG_PAGE / 8)))
> + return;
> +
> + page = addr / VHOST_LOG_PAGE;
> + while (page * VHOST_LOG_PAGE < addr + len) {
> + vhost_log_cache_page(dev, vq, page);
> + page += 1;
> + }
> +}
> +
> +
Just need one empty line here.
For the rest,
Reviewed-by: Tiwei Bie <[email protected]>
> void
> cleanup_vq(struct vhost_virtqueue *vq, int destroy)
> {