mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-02 01:45:21 +00:00
virtio-devices: net: Improve throughput with virtio features
By merging receive buffers through the VIRTIO_NET_F_MRG_RXBUF feature, as well as enabling the use of indirect descriptors through VIRTIO_RING_F_INDIRECT_DESC feature, we achieve better throughput for the virtio-net device without hurting its latency. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
495d4eb896
commit
58d25b3ccc
@ -34,7 +34,9 @@ use std::{collections::HashMap, convert::TryInto};
|
|||||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||||
use versionize_derive::Versionize;
|
use versionize_derive::Versionize;
|
||||||
use virtio_bindings::bindings::virtio_net::*;
|
use virtio_bindings::bindings::virtio_net::*;
|
||||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
use virtio_bindings::bindings::virtio_ring::{
|
||||||
|
VIRTIO_RING_F_EVENT_IDX, VIRTIO_RING_F_INDIRECT_DESC,
|
||||||
|
};
|
||||||
use virtio_queue::Queue;
|
use virtio_queue::Queue;
|
||||||
use vm_memory::{ByteValued, GuestMemoryAtomic};
|
use vm_memory::{ByteValued, GuestMemoryAtomic};
|
||||||
use vm_migration::VersionMapped;
|
use vm_migration::VersionMapped;
|
||||||
@ -398,7 +400,9 @@ impl Net {
|
|||||||
| 1 << VIRTIO_NET_F_HOST_TSO4
|
| 1 << VIRTIO_NET_F_HOST_TSO4
|
||||||
| 1 << VIRTIO_NET_F_HOST_TSO6
|
| 1 << VIRTIO_NET_F_HOST_TSO6
|
||||||
| 1 << VIRTIO_NET_F_HOST_UFO
|
| 1 << VIRTIO_NET_F_HOST_UFO
|
||||||
|
| 1 << VIRTIO_NET_F_MRG_RXBUF
|
||||||
| 1 << VIRTIO_RING_F_EVENT_IDX
|
| 1 << VIRTIO_RING_F_EVENT_IDX
|
||||||
|
| 1 << VIRTIO_RING_F_INDIRECT_DESC
|
||||||
| 1 << VIRTIO_F_VERSION_1;
|
| 1 << VIRTIO_F_VERSION_1;
|
||||||
|
|
||||||
if iommu {
|
if iommu {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user