10
10
//
11
11
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
12
12
13
- //! A crate that exposes the virtio queue API .
13
+ //! Virtio queue API for backend device drivers to access virtio queues .
14
14
15
15
#![ deny( missing_docs) ]
16
16
@@ -28,17 +28,16 @@ use std::ops::{Deref, DerefMut};
28
28
use std:: sync:: atomic:: { fence, Ordering } ;
29
29
use std:: sync:: { Arc , Mutex , MutexGuard } ;
30
30
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;
37
32
use vm_memory:: {
38
33
Address , ByteValued , Bytes , GuestAddress , GuestAddressSpace , GuestMemory , GuestMemoryError ,
39
34
} ;
40
35
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
+ } ;
42
41
43
42
/// Virtio Queue related errors.
44
43
#[ derive( Debug ) ]
@@ -71,7 +70,7 @@ impl Display for Error {
71
70
72
71
impl std:: error:: Error for Error { }
73
72
74
- /// A virtio descriptor constraints with C representation
73
+ /// A virtio descriptor constraints with C representation.
75
74
#[ repr( C ) ]
76
75
#[ derive( Default , Clone , Copy , Debug ) ]
77
76
pub struct Descriptor {
0 commit comments