On Tue, Jan 09, 2018 at 02:12:02AM +0000, Chen, Junjie J wrote:
> > > + if (vring_need_event(vhost_used_event(vq), new, old)
> >
> > It's a bit weird that you use one from the standard linux header file
> > (vring_need_event), while you define you own one (vhost_used_event).
> > Note that the system header file also has "vring_used_event()" defined.
> The vring_used_event is defined and used for virtio in kernel, kernel defines
> a vhost_used_event in vhost.c for vhost, so I just use a separated macro for
> vhost end.
>
> I'd like to define both vhost_need_event and vhost_used_event in vhost.h to
> remove potential build issue in old linux distribution and also to keep
> consistent. Is that OK for you?
Yes.
--yliu