[dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write
Peter Xu
peterx at redhat.com
Tue Dec 22 06:11:02 CET 2015
On Thu, Dec 17, 2015 at 11:11:57AM +0800, Yuanhan Liu wrote:
> +static inline void __attribute__((always_inline))
> +vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len)
> +{
> + uint64_t page;
> +
> + if (likely(((dev->features & (1ULL << VHOST_F_LOG_ALL)) == 0) ||
> + !dev->log_base || !len))
> + return;
> +
> + if (unlikely(dev->log_size < ((addr + len - 1) / VHOST_LOG_PAGE / 8)))
Should it be "<="?
Peter
More information about the dev
mailing list