[dpdk-dev] [PATCH v2 1/5] vhost: un-inline dirty pages logging functions

Tiwei Bie tiwei.bie at intel.com
Mon May 20 07:18:35 CEST 2019


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 <tiwei.bie at intel.com>

>  void
>  cleanup_vq(struct vhost_virtqueue *vq, int destroy)
>  {


More information about the dev mailing list