mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
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 <robert.bradford@intel.com>
This commit is contained in:
parent
a4d377a066
commit
61aa4615e2
@ -27,6 +27,7 @@ use vhost_rs::vhost_user::message::*;
|
|||||||
use vhost_rs::vhost_user::{Error as VhostUserError, Listener};
|
use vhost_rs::vhost_user::{Error as VhostUserError, Listener};
|
||||||
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker};
|
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker};
|
||||||
use virtio_bindings::bindings::virtio_net::*;
|
use virtio_bindings::bindings::virtio_net::*;
|
||||||
|
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||||
use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap};
|
use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap};
|
||||||
use vm_virtio::net_util::{open_tap, RxVirtio, TxVirtio};
|
use vm_virtio::net_util::{open_tap, RxVirtio, TxVirtio};
|
||||||
use vm_virtio::NetQueuePair;
|
use vm_virtio::NetQueuePair;
|
||||||
@ -179,6 +180,7 @@ impl VhostUserBackend for VhostUserNetBackend {
|
|||||||
| 1 << VIRTIO_NET_F_HOST_TSO4
|
| 1 << VIRTIO_NET_F_HOST_TSO4
|
||||||
| 1 << VIRTIO_NET_F_HOST_UFO
|
| 1 << VIRTIO_NET_F_HOST_UFO
|
||||||
| 1 << VIRTIO_F_VERSION_1
|
| 1 << VIRTIO_F_VERSION_1
|
||||||
|
| 1 << VIRTIO_RING_F_EVENT_IDX
|
||||||
| VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits()
|
| VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user