diff --git a/Cargo.lock b/Cargo.lock index a2648f3d5..b28e84f2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5986,7 +5986,7 @@ dependencies = [ [[package]] name = "p4rs" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/p4?branch=main#33d646041f13062cc39c6f38725d8c95d4024a2f" +source = "git+https://github.com/oxidecomputer/p4?branch=main#89b725ca3d534089675ef59f1606882218b6a3c8" dependencies = [ "bitvec", "num", @@ -9130,7 +9130,7 @@ dependencies = [ [[package]] name = "softnpu" version = "0.2.0" -source = "git+https://github.com/oxidecomputer/softnpu#3828225fd5719dc985a300e36850d25a0405eba6" +source = "git+https://github.com/oxidecomputer/softnpu#42ff234fbb5e4b2da55eff9e11529694c43589d9" dependencies = [ "p4rs", "serde", diff --git a/lib/propolis/src/hw/virtio/softnpu.rs b/lib/propolis/src/hw/virtio/softnpu.rs index 94b83cff7..a15cea42d 100644 --- a/lib/propolis/src/hw/virtio/softnpu.rs +++ b/lib/propolis/src/hw/virtio/softnpu.rs @@ -775,6 +775,17 @@ fn handle_management_message( }; pl.1.remove_table_entry(&tm.table, &tm.keyset_data); } + ManagementRequest::TableClear(tc) => { + let mut pl_opt = pipeline.lock().unwrap(); + let pl = match &mut *pl_opt { + Some(pl) => pl, + None => return, + }; + + if !pl.1.clear_table_entries(&tc.table) { + warn!(log, "table clear: unknown table {}", tc.table); + } + } ManagementRequest::RadixRequest => { // the data is being sent back as ascii text because this is the // simplest way for the guest tty device to handle the data. control