1010//
1111// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
1212
13- //! A crate that exposes the virtio queue API .
13+ //! Virtio queue API for backend device drivers to access virtio queues .
1414
1515#![ deny( missing_docs) ]
1616
@@ -28,17 +28,16 @@ use std::ops::{Deref, DerefMut};
2828use std:: sync:: atomic:: { fence, Ordering } ;
2929use std:: sync:: { Arc , Mutex , MutexGuard } ;
3030
31- use defs:: {
32- VIRTQ_AVAIL_ELEMENT_SIZE , VIRTQ_AVAIL_RING_HEADER_SIZE , VIRTQ_AVAIL_RING_META_SIZE ,
33- VIRTQ_DESCRIPTOR_SIZE , VIRTQ_DESC_F_INDIRECT , VIRTQ_DESC_F_NEXT , VIRTQ_DESC_F_WRITE ,
34- VIRTQ_USED_ELEMENT_SIZE , VIRTQ_USED_F_NO_NOTIFY , VIRTQ_USED_RING_META_SIZE ,
35- } ;
36-
31+ use log:: error;
3732use vm_memory:: {
3833 Address , ByteValued , Bytes , GuestAddress , GuestAddressSpace , GuestMemory , GuestMemoryError ,
3934} ;
4035
41- use log:: error;
36+ use self :: defs:: {
37+ VIRTQ_AVAIL_ELEMENT_SIZE , VIRTQ_AVAIL_RING_HEADER_SIZE , VIRTQ_AVAIL_RING_META_SIZE ,
38+ VIRTQ_DESCRIPTOR_SIZE , VIRTQ_DESC_F_INDIRECT , VIRTQ_DESC_F_NEXT , VIRTQ_DESC_F_WRITE ,
39+ VIRTQ_USED_ELEMENT_SIZE , VIRTQ_USED_F_NO_NOTIFY , VIRTQ_USED_RING_META_SIZE ,
40+ } ;
4241
4342/// Virtio Queue related errors.
4443#[ derive( Debug ) ]
@@ -71,7 +70,7 @@ impl Display for Error {
7170
7271impl std:: error:: Error for Error { }
7372
74- /// A virtio descriptor constraints with C representation
73+ /// A virtio descriptor constraints with C representation.
7574#[ repr( C ) ]
7675#[ derive( Default , Clone , Copy , Debug ) ]
7776pub struct Descriptor {
0 commit comments