From 61aa4615e2ad801e5d4ef0e7836a35efc969ff26 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 1 Jun 2020 14:54:39 +0100 Subject: [PATCH] vhost_user_net: Implement VIRTIO_RING_F_EVENT_IDX The general handling of VIRTIO_RING_F_EVENT_IDX is in the vhost_user_backend functionality and the net specific handling is in the NetQueuePair from virtio-net. As such enabling for the vhost-user-net backend is just the case of adding the feature. Fixes: #789 Signed-off-by: Rob Bradford --- vhost_user_net/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vhost_user_net/src/lib.rs b/vhost_user_net/src/lib.rs index df84a857b..37f8ebd5c 100644 --- a/vhost_user_net/src/lib.rs +++ b/vhost_user_net/src/lib.rs @@ -27,6 +27,7 @@ use vhost_rs::vhost_user::message::*; use vhost_rs::vhost_user::{Error as VhostUserError, Listener}; use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker}; use virtio_bindings::bindings::virtio_net::*; +use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX; use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap}; use vm_virtio::net_util::{open_tap, RxVirtio, TxVirtio}; use vm_virtio::NetQueuePair; @@ -179,6 +180,7 @@ impl VhostUserBackend for VhostUserNetBackend { | 1 << VIRTIO_NET_F_HOST_TSO4 | 1 << VIRTIO_NET_F_HOST_UFO | 1 << VIRTIO_F_VERSION_1 + | 1 << VIRTIO_RING_F_EVENT_IDX | VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits() }