Added new attribute SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE#2276
Added new attribute SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE#2276milosmoskovljevic wants to merge 3 commits into
Conversation
Signed-off-by: milos moskovljevic <milosmoskovljevic.moskva@gmail.com>
135b1b8 to
ef6c246
Compare
| SAI_MIRROR_SESSION_ATTR_LABEL, | ||
|
|
||
| /** | ||
| * @brief Guarantee sample rate in packets per second (pps) |
There was a problem hiding this comment.
Newly introduced attr - SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE is in packet-rate threshold(pps) and existing SAI_MIRROR_SESSION_ATTR_SAMPLE_RATE statistical sampling (1:N statistical ratio) - Since these attribute operate in different domain - can you define the interaction semantics in this proposal.
There was a problem hiding this comment.
I have added the documentation, it should be much clearer now.
Signed-off-by: milos moskovljevic <milosmoskovljevic.moskva@gmail.com>
Signed-off-by: milos moskovljevic <milosmoskovljevic.moskva@gmail.com>
| * @flags CREATE_AND_SET | ||
| * @default 0 | ||
| */ | ||
| SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE, |
There was a problem hiding this comment.
This PR adds SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE to complement the existing SAI_MIRROR_SESSION_ATTR_SAMPLE_RATE on mirror sessions object. Similar 1-in-N statistical sampling concept (SAI_SAMPLEPACKET_ATTR_SAMPLE_RATE) exists independently on SAI_OBJECT_TYPE_SAMPLEPACKET in saisamplepacket.h as well
SAI defines two sampling architectures:
Method A: Mirror session owns the sampling rate
Method B : Sample session owns 1-in-N sampling decision; in such cases, the mirror session handles encapsulation only. In method B, there is no way to express a guarantee rate.
Does this PR scopes to extend the saisamplepacket.h as well ?
Introduce a new mirror session attribute SAI_MIRROR_SESSION_ATTR_GUARANTEE_RATE to support guaranteed sampling for mirror sessions.
The attribute defines a sample rate in packets per second (pps) below which all traffic is sampled. Above that rate, sampling falls back to the existing statistical sampling controlled by SAI_MIRROR_SESSION_ATTR_SAMPLE_RATE.