#[non_exhaustive]pub struct FailureDumpRingbuf {
pub capacity: u64,
pub consumer_pos: u64,
pub producer_pos: u64,
pub pending_pos: u64,
pub pending_bytes: u64,
}Expand description
Ringbuf occupancy snapshot read from struct bpf_ringbuf at the
freeze instant.
Capacity, consumer/producer positions, and the in-flight reservation
frontier (pending_pos) are all that’s readable without walking the
records. Pending bytes (= producer_pos - consumer_pos, computed
with unsigned wraparound) is the operator-visible indicator: low
values = consumer keeping up; values approaching capacity = consumer
stuck or kernel producer overrunning. A non-zero gap between
producer_pos and pending_pos means a producer is mid-reserve
and the consumer can’t advance past pending_pos.
Read via crate::monitor::btf_offsets::BpfRingbufOffsets; rendered
in render_ringbuf_state.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.capacity: u64Ring data area capacity in bytes (= mask + 1). Always a
power of two; matches the map’s declared max_entries.
consumer_pos: u64Consumer position. Byte index of the next record userspace will read. Monotonically advances; the kernel never writes here.
producer_pos: u64Producer position. Byte index past the last reserved record.
Monotonically advances; updated by the kernel on each
bpf_ringbuf_reserve.
pending_pos: u64Pending position. Byte index of the oldest in-flight (still
being filled) reservation. Records below pending_pos are
committed and visible to the consumer; records between
pending_pos and producer_pos are reserved but not yet
committed.
pending_bytes: u64Pending bytes (= producer_pos.wrapping_sub(consumer_pos)).
0 = consumer caught up; capacity = ring full / consumer
stalled. Computed with unsigned wraparound to match the
kernel’s dispatch-path arithmetic.
Trait Implementations§
Source§impl Clone for FailureDumpRingbuf
impl Clone for FailureDumpRingbuf
Source§fn clone(&self) -> FailureDumpRingbuf
fn clone(&self) -> FailureDumpRingbuf
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FailureDumpRingbuf
impl Debug for FailureDumpRingbuf
Source§impl Default for FailureDumpRingbuf
impl Default for FailureDumpRingbuf
Source§fn default() -> FailureDumpRingbuf
fn default() -> FailureDumpRingbuf
Source§impl<'de> Deserialize<'de> for FailureDumpRingbuf
impl<'de> Deserialize<'de> for FailureDumpRingbuf
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for FailureDumpRingbuf
impl RefUnwindSafe for FailureDumpRingbuf
impl Send for FailureDumpRingbuf
impl Sync for FailureDumpRingbuf
impl Unpin for FailureDumpRingbuf
impl UnwindSafe for FailureDumpRingbuf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more