mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Fix various warnings from clippy 0.1.82
An example warning output is:
error: first doc comment paragraph is too long
--> virtio-devices/src/lib.rs:158:1
|
158 | / /// Convert an absolute address into an address space (GuestMemory)
159 | | /// to a host pointer and verify that the provided size define a valid
160 | | /// range within a single memory region.
161 | | /// Return None if it is out of bounds or if addr+size overlaps a single region.
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
= note: `-D clippy::too-long-first-doc-paragraph` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -177,6 +177,8 @@ pub trait VirtioDevice: Send {
|
||||
fn set_access_platform(&mut self, _access_platform: Arc<dyn AccessPlatform>) {}
|
||||
}
|
||||
|
||||
/// Trait to define address translation for devices managed by virtio-iommu
|
||||
///
|
||||
/// Trait providing address translation the same way a physical DMA remapping
|
||||
/// table would provide translation between an IOVA and a physical address.
|
||||
/// The goal of this trait is to be used by virtio devices to perform the
|
||||
|
||||
@@ -155,6 +155,8 @@ impl TryInto<rate_limiter::RateLimiter> for RateLimiterConfig {
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the host virtual address corresponding to the given guest address range
|
||||
///
|
||||
/// Convert an absolute address into an address space (GuestMemory)
|
||||
/// to a host pointer and verify that the provided size define a valid
|
||||
/// range within a single memory region.
|
||||
|
||||
@@ -115,6 +115,7 @@ pub enum VsockEpollHandlerError {
|
||||
}
|
||||
|
||||
/// A passive, event-driven object, that needs to be notified whenever an epoll-able event occurs.
|
||||
///
|
||||
/// An event-polling control loop will use `get_polled_fd()` and `get_polled_evset()` to query
|
||||
/// the listener for the file descriptor and the set of events it's interested in. When such an
|
||||
/// event occurs, the control loop will route the event to the listener via `notify()`.
|
||||
@@ -130,8 +131,9 @@ pub trait VsockEpollListener {
|
||||
fn notify(&mut self, evset: epoll::Events);
|
||||
}
|
||||
|
||||
/// Any channel that handles vsock packet traffic: sending and receiving packets. Since we're
|
||||
/// implementing the device model here, our responsibility is to always process the sending of
|
||||
/// Trait to describe any channel that handles vsock packet traffic (sending and receiving packets)
|
||||
///
|
||||
/// Since we're implementing the device model here, our responsibility is to always process the sending of
|
||||
/// packets (i.e. the TX queue). So, any locally generated data, addressed to the driver (e.g.
|
||||
/// a connection response or RST), will have to be queued, until we get to processing the RX queue.
|
||||
///
|
||||
@@ -151,8 +153,9 @@ pub trait VsockChannel {
|
||||
fn has_pending_rx(&self) -> bool;
|
||||
}
|
||||
|
||||
/// The vsock backend, which is basically an epoll-event-driven vsock channel, that needs to be
|
||||
/// sendable through a mpsc channel (the latter due to how `vmm::EpollContext` works).
|
||||
/// The vsock backend, which is basically an epoll-event-driven vsock channel
|
||||
///
|
||||
/// It that needs to be sendable through a mpsc channel (the latter due to how `vmm::EpollContext` works).
|
||||
/// Currently, the only implementation we have is `crate::virtio::unix::muxer::VsockMuxer`, which
|
||||
/// translates guest-side vsock connections to host-side Unix domain socket connections.
|
||||
pub trait VsockBackend: VsockChannel + VsockEpollListener + Send {}
|
||||
|
||||
Reference in New Issue
Block a user