MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / handle_tx_event

Method handle_tx_event

virtio-devices/src/net.rs:233–245  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

231 }
232
233 fn handle_tx_event(&mut self) -> result::Result<(), DeviceError> {
234 let rate_limit_reached = self
235 .net
236 .tx_rate_limiter
237 .as_ref()
238 .is_some_and(|r| r.is_blocked());
239
240 if !rate_limit_reached {
241 self.process_tx()?;
242 }
243
244 Ok(())
245 }
246
247 fn handle_rx_tap_event(&mut self) -> result::Result<(), DeviceError> {
248 let res = self

Callers 1

handle_eventMethod · 0.80

Calls 2

is_blockedMethod · 0.45
process_txMethod · 0.45

Tested by

no test coverage detected