Skip to content

Commit 5d948bf

Browse files
authored
SoftNpu early return on empty guest virtio buffers, bump dlpi crate, fix duplicate crate import issue (#274)
1 parent 721529f commit 5d948bf

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

bin/propolis-standalone/src/main.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,9 @@ impl Instance {
264264
match state {
265265
State::Run => {
266266
if first_boot {
267-
ent.start().expect(&format!(
268-
"entity {} failed to start",
269-
record.name()
270-
));
267+
ent.start().unwrap_or_else(|_| {
268+
panic!("entity {} failed to start", record.name())
269+
});
271270
} else {
272271
ent.resume();
273272
}

crates/bhyve-api/header-check/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.0.0"
44
authors = ["Patrick Mooney <[email protected]>"]
55
license = "MPL-2.0"
66
build = "build.rs"
7+
publish = false
78

89
[dependencies]
910
bhyve_api = { path = ".." }

crates/viona-api/header-check/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.0.0"
44
authors = ["Patrick Mooney <[email protected]>"]
55
license = "MPL-2.0"
66
build = "build.rs"
7+
publish = false
78

89
[dependencies]
910
viona_api = { path = ".." }

lib/propolis/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ branch = "main"
6565
optional = true
6666
package = "softnpu"
6767

68-
#see: https://github.com/oxidecomputer/dlpi-sys/issues/1
6968
[dependencies.dlpi]
7069
git = "https://github.com/oxidecomputer/dlpi-sys"
71-
rev = "eb4dffeef88f86294d939aeb5521509ea3d59b69"
70+
branch = "main"
7271
optional = true
7372

7473
[dev-dependencies]

lib/propolis/src/hw/virtio/softnpu.rs

+2
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ impl PciVirtioSoftNpuPort {
330330
if n != 10 {
331331
if n > 0 {
332332
push_used = true;
333+
} else {
334+
break;
333335
}
334336
warn!(self.log, "failed to read virtio mystery bytes ({})", n);
335337
//break;

0 commit comments

Comments
 (0)