Hi, On Tue, Nov 28, 2017 at 04:48:26AM -0500, junjie.j.c...@intel.com wrote: [...] > @@ -195,6 +197,10 @@ struct vhost_msg { > > #define VHOST_USER_F_PROTOCOL_FEATURES 30 > > +#ifndef VIRTIO_F_EVENT_IDX > + #define VIRTIO_F_EVENT_IDX 29 > +#endif > + > /* Features supported by this builtin vhost-user net driver. */ > #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > @@ -212,7 +218,8 @@ struct vhost_msg { > (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \ > (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \ > (1ULL << VIRTIO_NET_F_MTU) | \ > - (1ULL << VIRTIO_F_IOMMU_PLATFORM)) > + (1ULL << VIRTIO_F_IOMMU_PLATFORM) | \ > + (1ULL << VIRTIO_F_EVENT_IDX)) >
You can use VIRTIO_RING_F_EVENT_IDX directly. It has already been defined by Linux. And you can add this new feature bit after VIRTIO_RING_F_INDIRECT_DESC: diff --git i/lib/librte_vhost/vhost.h w/lib/librte_vhost/vhost.h index 2f36a034e..350ac3acc 100644 --- i/lib/librte_vhost/vhost.h +++ w/lib/librte_vhost/vhost.h @@ -211,6 +211,7 @@ struct vhost_msg { (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \ (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \ (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \ + (1ULL << VIRTIO_RING_F_EVENT_IDX) | \ (1ULL << VIRTIO_NET_F_MTU) | \ (1ULL << VIRTIO_F_IOMMU_PLATFORM)) Best regards, Tiwei