vm-virtio: drop VirtqUsedElem from its test module

Use the one defined in virtio_queue instead.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2021-11-17 13:48:16 +00:00 committed by Rob Bradford
parent 1a2b01888c
commit f035cff10f

View File

@ -11,7 +11,7 @@
pub mod testing {
use std::marker::PhantomData;
use std::mem;
use virtio_queue::{Queue, QueueState};
use virtio_queue::{Queue, QueueState, VirtqUsedElem};
use vm_memory::{bitmap::AtomicBitmap, Address, GuestAddress, GuestUsize};
use vm_memory::{Bytes, GuestMemoryAtomic};
@ -163,15 +163,6 @@ pub mod testing {
}
}
#[repr(C)]
#[derive(Clone, Copy, Default)]
pub struct VirtqUsedElem {
pub id: u32,
pub len: u32,
}
unsafe impl vm_memory::ByteValued for VirtqUsedElem {}
pub type VirtqAvail<'a> = VirtqRing<'a, u16>;
pub type VirtqUsed<'a> = VirtqRing<'a, VirtqUsedElem>;