Skip to content

Commit

Permalink
Reduce test verbosity in arp.rs
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Yao <andrewyao@utexas.edu>
Co-authored-by: Himanshu Reddy <himanshureddy@utexas.edu>
Co-authored-by: Goldin Vo <goldinbaokimvo@utexas.edu>
  • Loading branch information
3 people committed May 7, 2024
1 parent 016c52e commit 1a66088
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/vmm/src/dumbo/tcp/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ impl Endpoint {
// We have to remove the bytes up to end from receive_buf, by shifting the
// others to the beginning of the buffer, and updating receive_buf_left.
// Also, advance the rwnd edge of the inner connection.
b.copy_within(end.., 0);
// TODO: Maximum efficiency.
for j in 0..b.len() - end {
b[j] = b[j + end];
}
self.receive_buf_left -= end;
// Safe to unwrap because we assert that the response buffer is small
// enough.
Expand Down Expand Up @@ -647,4 +650,4 @@ mod tests {
let actual_response = parse_request_bytes(request_bytes, mock_callback);
assert_eq!(actual_response, expected_response);
}
}
}

0 comments on commit 1a66088

Please sign in to comment.