From 23cedece5c62ea7ea51d88fd09eb7ab1688e75aa Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Tue, 10 Dec 2024 13:40:29 -0500 Subject: [PATCH] Updates per review --- Cargo.lock | 4 ++-- task/control-plane-agent/src/dump.rs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf533cd41..2fafe7221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2994,8 +2994,8 @@ dependencies = [ [[package]] name = "humpty" -version = "0.1.3" -source = "git+https://github.com/oxidecomputer/humpty#f6871f6d8844c3d2ee09c467f50b9f186652cb41" +version = "0.1.4" +source = "git+https://github.com/oxidecomputer/humpty#ca6b7441471146dbf3aa976e029a7828db55b552" dependencies = [ "hubpack", "lzss", diff --git a/task/control-plane-agent/src/dump.rs b/task/control-plane-agent/src/dump.rs index 095fd3a45..c3b57f78e 100644 --- a/task/control-plane-agent/src/dump.rs +++ b/task/control-plane-agent/src/dump.rs @@ -60,7 +60,6 @@ impl DumpState { pub(crate) fn get_task_dump_count(&mut self) -> Result { let mut count = 0; for index in 0.. { - // XXX accidentally quadratic! let data = self .agent .read_dump(index, 0) @@ -92,7 +91,6 @@ impl DumpState { let mut data = [0u8; 256]; let mut header = humpty::DumpAreaHeader::new_zeroed(); for index in 0.. { - // XXX accidentally quadratic! data = self .agent .read_dump(index, 0) @@ -254,9 +252,7 @@ impl DumpState { ) .map_err(|_e| SpError::Dump(DumpError::ReadFailed))?; pos.offset += ds.compressed_length as u32; - while pos.offset & 3 != 0 { - // pad to the nearest u32 - // XXX why is `humpty::DUMP_SEGMENT_MASK` private? + while pos.offset as usize & humpty::DUMP_SEGMENT_MASK != 0 { pos.offset += 1; }