pub struct Simple {
pub alpha: f64,
pub delay_budget: i64,
}Fields§
§alpha: f64This is used to calculate the arrival rate:
Rate_n = alpha * Sample_n + (1 - alpha) * Rate_(n-1)
The bigger this value, the more sensitive it is to the latest sample.
Must be in the range [0, 1].
delay_budget: i64Wait time budget at the driver.
This is equivalent to W in Little’s Law. More practically, this is an upper bound for the average time buffers spend waiting in the queue of the device impl before they are processed by the device interface.
Guidance for driver implementors:
- If your driver uses a interrupt coalescing timeout, then this W should just be that or slightly larger to account for the processing time.
- If your driver does not use moderation, this value can be tuned: a starting point would be to use (bit rate, MTU, Rx depth) to derive a W under maximum pressure. As a reference (1Gbps, 1500, 256) leads to a W of 3.0 ms (256 / (10**9 / 8 / 1500) seconds). It will make little sense to go any bigger than that and you can decrease it and monitor for packet drops. You can compare the value against common interrupt coalescing configurations for reference.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Simple, D> for Simple
impl<D: ResourceDialect> Decode<Simple, D> for Simple
Source§impl<D: ResourceDialect, T0: Encode<f64, D>, T1: Encode<i64, D>> Encode<Simple, D> for (T0, T1)
impl<D: ResourceDialect, T0: Encode<f64, D>, T1: Encode<i64, D>> Encode<Simple, D> for (T0, T1)
Source§impl PartialOrd for Simple
impl PartialOrd for Simple
Source§impl TypeMarker for Simple
impl TypeMarker for Simple
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for Simple
impl ValueTypeMarker for Simple
impl Copy for Simple
impl Persistable for Simple
impl StructuralPartialEq for Simple
Auto Trait Implementations§
impl Freeze for Simple
impl RefUnwindSafe for Simple
impl Send for Simple
impl Sync for Simple
impl Unpin for Simple
impl UnsafeUnpin for Simple
impl UnwindSafe for Simple
Blanket Implementations§
Source§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
Mutably borrows from an owned value. Read more