Struct retina_core::config::SinkConfig
source · 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-tuples
Fields§
§core: u32
Sink core identifier.
nb_buckets: usize
Number 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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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