Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Weipeng Liu committed Nov 7, 2024
1 parent a6160cb commit b607421
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/rust/catpowder/win/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct CatpowderRuntimeInner {
api: XdpApi,
tx: TxRing,
rx_rings: Vec<RxRing>,
vf_rx_rings : Vec<RxRing>,
vf_rx_rings: Vec<RxRing>,
}
//======================================================================================================================
// Implementations
Expand Down Expand Up @@ -77,13 +77,18 @@ impl SharedCatpowderRuntime {
trace!("Created {} RX rings on interface {}", rx_rings.len(), ifindex);

let vf_queue_count = deduce_rss_settings(&mut api, vf_if_index)?;
let mut vf_rx_rings= Vec::with_capacity(vf_queue_count as usize);
let mut vf_rx_rings = Vec::with_capacity(vf_queue_count as usize);
for queueid in 0..vf_queue_count {
vf_rx_rings.push(RxRing::new(&mut api, Self::RING_LENGTH, vf_if_index, queueid as u32)?);
}
trace!("Created {} RX rings on interface {}.", vf_rx_rings.len(), vf_if_index);

Ok(Self(SharedObject::new(CatpowderRuntimeInner { api, tx, rx_rings, vf_rx_rings })))
Ok(Self(SharedObject::new(CatpowderRuntimeInner {
api,
tx,
rx_rings,
vf_rx_rings,
})))
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/rust/demikernel/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ impl Config {
if let Some(addr) = Self::get_typed_env_option(raw_socket_config::LOCAL_VF_INTERFACE_INDEX)? {
Ok(addr)
} else {
Self::get_int_option(self.get_raw_socket_config()?, raw_socket_config::LOCAL_VF_INTERFACE_INDEX)
Self::get_int_option(
self.get_raw_socket_config()?,
raw_socket_config::LOCAL_VF_INTERFACE_INDEX,
)
}
}

Expand Down

0 comments on commit b607421

Please sign in to comment.