pub struct DatapathStats {Show 17 fields
pub tx_packets: CachePadded<AtomicU64>,
pub tx_bytes: CachePadded<AtomicU64>,
pub tx_dropped: CachePadded<AtomicU64>,
pub tx_errors: CachePadded<AtomicU64>,
pub rx_packets: CachePadded<AtomicU64>,
pub rx_bytes: CachePadded<AtomicU64>,
pub rx_dropped: CachePadded<AtomicU64>,
pub rx_errors: CachePadded<AtomicU64>,
pub nat_translations: CachePadded<AtomicU64>,
pub nat_fast_path_hits: CachePadded<AtomicU64>,
pub nat_slow_path_lookups: CachePadded<AtomicU64>,
pub nat_connections_created: CachePadded<AtomicU64>,
pub nat_connections_expired: CachePadded<AtomicU64>,
pub poll_iterations: CachePadded<AtomicU64>,
pub poll_work_done: CachePadded<AtomicU64>,
pub poll_busy_spins: CachePadded<AtomicU64>,
pub batch_histogram: [CachePadded<AtomicU64>; 8],
}Expand description
Datapath performance statistics.
All counters are cache-line aligned to prevent false sharing when updated from different threads.
Fields§
§tx_packets: CachePadded<AtomicU64>Total packets transmitted (guest -> host).
tx_bytes: CachePadded<AtomicU64>Total bytes transmitted.
tx_dropped: CachePadded<AtomicU64>TX packets dropped due to full queue.
tx_errors: CachePadded<AtomicU64>TX errors.
rx_packets: CachePadded<AtomicU64>Total packets received (host -> guest).
rx_bytes: CachePadded<AtomicU64>Total bytes received.
rx_dropped: CachePadded<AtomicU64>RX packets dropped due to full queue.
rx_errors: CachePadded<AtomicU64>RX errors.
nat_translations: CachePadded<AtomicU64>NAT translations performed.
nat_fast_path_hits: CachePadded<AtomicU64>NAT fast path hits.
nat_slow_path_lookups: CachePadded<AtomicU64>NAT slow path lookups.
nat_connections_created: CachePadded<AtomicU64>NAT connection tracking entries created.
nat_connections_expired: CachePadded<AtomicU64>NAT connection tracking entries expired.
poll_iterations: CachePadded<AtomicU64>Poll loop iterations.
poll_work_done: CachePadded<AtomicU64>Poll loop iterations with work done.
poll_busy_spins: CachePadded<AtomicU64>Poll loop busy spins (no work).
batch_histogram: [CachePadded<AtomicU64>; 8]Batch sizes histogram (power of 2 buckets). [0]: 1 packet, [1]: 2 packets, [2]: 4 packets, etc.
Implementations§
Source§impl DatapathStats
impl DatapathStats
Sourcepub fn record_tx_drop(&self)
pub fn record_tx_drop(&self)
Records a TX drop.
Sourcepub fn record_tx_error(&self)
pub fn record_tx_error(&self)
Records a TX error.
Sourcepub fn record_rx_drop(&self)
pub fn record_rx_drop(&self)
Records an RX drop.
Sourcepub fn record_rx_error(&self)
pub fn record_rx_error(&self)
Records an RX error.
Sourcepub fn record_nat_translation(&self, fast_path: bool)
pub fn record_nat_translation(&self, fast_path: bool)
Records a NAT translation.
Sourcepub fn record_nat_connection_created(&self)
pub fn record_nat_connection_created(&self)
Records a new NAT connection.
Sourcepub fn record_nat_connection_expired(&self)
pub fn record_nat_connection_expired(&self)
Records an expired NAT connection.
Sourcepub fn record_poll(&self, work_done: bool)
pub fn record_poll(&self, work_done: bool)
Records a poll iteration.
Sourcepub fn record_batch_size(&self, size: usize)
pub fn record_batch_size(&self, size: usize)
Records a batch size in the histogram.
Sourcepub fn snapshot(&self) -> StatsSnapshot
pub fn snapshot(&self) -> StatsSnapshot
Returns a snapshot of current statistics.