Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of stale PRs #4607

Merged
merged 7 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/vmm/src/devices/virtio/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@
let desc = match mem.read_obj::<Descriptor>(desc_head) {
Ok(ret) => ret,
Err(err) => {
// TODO log address
error!("Failed to read virtio descriptor from memory: {}", err);
error!(
"Failed to read virtio descriptor from memory at address {:#x}: {}",

Check warning on line 98 in src/vmm/src/devices/virtio/queue.rs

View check run for this annotation

Codecov / codecov/patch

src/vmm/src/devices/virtio/queue.rs#L97-L98

Added lines #L97 - L98 were not covered by tests
desc_head.0, err
);
return None;
}
};
Expand Down
12 changes: 11 additions & 1 deletion src/vmm/src/dumbo/tcp/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,23 @@ pub struct Endpoint {
// is the only option).

impl Endpoint {
/// Creates a new Endpoint from a [`crate::tcp::connection::Connection`]
/// ## Arguments:
/// - `segment`: The incoming `SYN`.
/// - `eviction_threshold`: CPU cycles that must elapse before this Endpoint is evictable
/// - `connection_rto_period`: How long the connection waits before a retransmission timeout
/// fires for the first segment which has not been acknowledged yet. This uses an opaque time
/// unit.
/// - `connection_rto_count_max`: How many consecutive timeout-based retransmission may occur
/// before the connection resets itself.
/// ## Panics:
/// - `assert!(RCV_BUF_MAX_SIZE <= MAX_WINDOW_SIZE as usize);`
pub fn new<T: NetworkBytes + Debug>(
segment: &TcpSegment<T>,
eviction_threshold: NonZeroU64,
connection_rto_period: NonZeroU64,
connection_rto_count_max: NonZeroU16,
) -> Result<Self, PassiveOpenError> {
// TODO: mention this in doc comment for function
// This simplifies things, and is a very reasonable assumption.
#[allow(clippy::assertions_on_constants)]
{
Expand Down
2 changes: 0 additions & 2 deletions src/vmm/src/logger/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ pub struct Metrics<T: Serialize, M: Write + Send> {

impl<T: Serialize + Debug, M: Write + Send + Debug> Metrics<T, M> {
/// Creates a new instance of the current metrics.
// TODO: We need a better name than app_metrics (something that says that these are the actual
// values that we are writing to the metrics_buf).
pub const fn new(app_metrics: T) -> Metrics<T, M> {
Metrics {
metrics_buf: OnceLock::new(),
Expand Down
Loading