-
Notifications
You must be signed in to change notification settings - Fork 728
[switchorch][mirrororch]: Add sampled port mirroring with truncation support #4502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
prsunny
merged 41 commits into
sonic-net:master
from
Janetxxx:dev/jc/sampled-port-mirror-capability
Jun 18, 2026
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
e771bc7
add capability check for sampled port mirror
Janetxxx a9d7e01
extend mock tests
Janetxxx 38fdbc4
[orchagent] Add sampled port mirroring support to MirrorOrch
Janetxxx 648e5d1
Add updateEntry implementationAdd updateEntry implementation
Janetxxx 72c5233
Implement hybrid session update: in-place for mutable fields, delete…
Janetxxx b0f2246
Write sample_rate and truncate_size to STATE_DB in setSessionState
Janetxxx 0473ba4
Add capability check with fallback for sampled mirroring and truncation
Janetxxx bb1eeef
[mirrororch] Fix SPAN session regression: only route ERSPAN updates t…
Janetxxx 3dd93d0
Add VS tests for sampled ERSPAN port mirroring
Janetxxx 70ad543
[VS test] Add update, invalid entry, cleanup and multi-port tests for…
Janetxxx df9e5b9
[mirrororch] Fix updateEntry: compare field values instead of presenc…
Janetxxx 870724c
Add mock tests for updateEntry coverage
Janetxxx a7bbf90
Add samplepacket conflict check before binding to port
Janetxxx 9656e42
Add samplepacket conflict check to sFlowOrch
Janetxxx 207a2c8
Add mock test for updateEntry immutable field change
Janetxxx 8f5ea1c
Add mock test for sFlowOrch samplepacket conflict check
Janetxxx 008aa3c
reject early if sample rate or truncation is not supported rather tha…
Janetxxx 70d408b
sFlow: pre-check both directions, rollback ingress on egress failure
Janetxxx dc97dd8
mirrororch: expand LAG source ports for sampled mirror sessions
Janetxxx 8ff5cc5
mirrororch: treat sampled <-> full mirror transition as immutable up…
Janetxxx 3449a82
mirrororch: treat sampled <-> full mirror transition as immutable up…
Janetxxx 4956515
mirrororch: fix three updateEntry / STATE_DB consistency bugs
Janetxxx 8df24f3
sFlow: harden samplepacket binding against owner conflicts
Janetxxx de574e4
tests: tighten mirror sampled VS tests
Janetxxx 0686d77
tests/mock: cover updateEntry truncate/recreate paths and STATE_DB hdel
Janetxxx 9dafb4b
tests/mock: cover sFlow port-binding conflict pre-checks
Janetxxx 0bf5d7a
mirrororch: add mock_test for samplepacket removal path
Janetxxx 5065c4f
add mock tests to sampled mirror phy port set, conflict and clear
Janetxxx 8afcbaf
Mock INGRESS samplepacket port attrs in mirrororch_ut“
Janetxxx 4705e00
[sfloworch][test] Cover ingress samplepacket conflict pre-check branches
Janetxxx efbb2df
[mirrororch] Drop LCOV_EXCL on gtest-covered capability-reject paths
Janetxxx 4e5acb6
[mirrororch] Remove in-place mirror-session update; reject duplicates
Janetxxx 91c9849
[mirrororch] createEntry validates the sample-mirror capability per d…
Janetxxx cf82ea2
[mirrororch] Default sample rate to 1 for truncation without sample rate
Janetxxx 8654efb
[mirrororch]: remove the LCOV exclusions on the sample_rate/truncate_…
Janetxxx 955b56f
[mirrororch]: Add unit tests covering sampled mirror SAI set/clear fa…
Janetxxx 078faa7
[mirrororch]: Add unit tests covering samplepacket SAI create/remove …
Janetxxx 83ed4d5
[VS test]: align sampled-mirror VS tests with current behavior and e…
Janetxxx 0a1fd39
[sfloworch] drop LCOV lines
Janetxxx 8e2332f
[VS test] Add an autouse isolation fixture that force-cleans the shar…
Janetxxx 2e0d34a
[sfloworch]: Refactor sflowAddPort to remove duplicated logic and dro…
Janetxxx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.