pub struct SinkConfig {
pub core: u32,
pub nb_buckets: usize,
}Expand description
Sink core options.
A “sink” core is a utility core whose sole purpose is to drop received traffic. This is useful for connection sampling, as entire 4-tuples can be discarded by redirecting them to the sink core.
§Remarks
Adding a sink core prevents ethtool counters from classifying intentionally discarded packets as packet loss. However, it can be quite wasteful of system resources, as it requires configuring one additional core per interface and thrashes the cache.
§Example
[online.ports.sink]
core = 9
nb_buckets = 384 # drops 25% of 4-tuplesFields§
§core: u32Sink core identifier.
nb_buckets: usizeNumber of RSS redirection table buckets to use for receive queues. Defaults to 512, which
indicates no sampling.
§Remarks
Connection sampling is implemented by only polling from a fraction of the available RSS
redirection buckets. nb_buckets must range from the number of cores polling the port (call
this n) to 512, which is the maximum number of buckets in the RSS redirection table. It
is recommended that nb_buckets be a multiple of n for better load balancing. For
example, setting nb_buckets = 256 would drop 50% of connections.
Trait Implementations§
Source§impl Clone for SinkConfig
impl Clone for SinkConfig
Source§fn clone(&self) -> SinkConfig
fn clone(&self) -> SinkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SinkConfig
impl Debug for SinkConfig
Source§impl<'de> Deserialize<'de> for SinkConfig
impl<'de> Deserialize<'de> for SinkConfig
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 SinkConfig
impl RefUnwindSafe for SinkConfig
impl Send for SinkConfig
impl Sync for SinkConfig
impl Unpin for SinkConfig
impl UnwindSafe for SinkConfig
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