Skip to content

Add sample packet and sample mirror attributes to LAG - #2369

Merged
tjchadaga merged 1 commit into
opencomputeproject:masterfrom
darius-nexthop:darius.lag-sflow-sample-attrs
Oct 23, 2026
Merged

tjchadaga merged 1 commit into
opencomputeproject:masterfrom
darius-nexthop:darius.lag-sflow-sample-attrs

Conversation

@darius-nexthop

@darius-nexthop darius-nexthop commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Add SAMPLEPACKET_ENABLE and SAMPLE_MIRROR_SESSION (ingress/egress) to sai_lag_attr_t, mirroring the port attributes. Lets sampling be configured on the LAG instead of on each member port.

The new LAG mirror-session attributes create the same LAG -> MIRROR_SESSION -> MONITOR_PORT loop the port versions have, so they're added to the known-loops skip list in saisanitycheck.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@darius-nexthop
darius-nexthop marked this pull request as ready for review October 21, 2026 15:24
@tjchadaga
tjchadaga requested a review from abdosi October 21, 2026 16:35
@tjchadaga

Copy link
Copy Markdown
Collaborator

Comment thread inc/sailag.h Resolved
Comment thread inc/sailag.h Resolved

@rck-innovium rck-innovium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Today, the application can attach the sampler/mirror on each member port of the LAG. Please explain the use-case of needing a LAG level sampler/mirror.

  2. Please define the expected behavior. For example if a sampler with rate S1 is applied on a LAG with member ports P1 and P2, is the expectation that net sampled packets on both P1 and P2 be around S1 or should each port get around S1?

@tjchadaga

Copy link
Copy Markdown
Collaborator

@darius-nexthop - as discussed in the community meeting, please update the PR comments or add documentation to describe behavior when config is applied on both lag and member port. Please also help address comments below

@tjchadaga tjchadaga added the reviewed PR is discussed in SAI Meeting label Oct 22, 2026
@darius-nexthop

darius-nexthop commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

@rck-innovium

  1. Today, the application can attach the sampler/mirror on each member port of the LAG. Please explain the use-case of needing a LAG level sampler/mirror.

This is the same model SAI already uses for other per-port features, such as PORT_VLAN_ID or INGRESS_ACL. Sampling is configured on a PortChannel as one interface, which also simplifies work from the application. It also covers platforms that can only sample at the LAG level instead of the port level.

  1. Please define the expected behavior. For example if a sampler with rate S1 is applied on a LAG with member ports P1 and P2, is the expectation that net sampled packets on both P1 and P2 be around S1 or should each port get around S1?

Each member samples 1 in S1 of its own packets. That means the LAG as a whole is also sampled at about 1 in S1.

@darius-nexthop

Copy link
Copy Markdown
Contributor Author

@darius-nexthop - as discussed in the community meeting, please update the PR comments or add documentation to describe behavior when config is applied on both lag and member port. Please also help address comments below

@tjchadaga - PR comments have been updated and comments have been addressed, thanks.

@tjchadaga

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@tjchadaga

Copy link
Copy Markdown
Collaborator

@darius-nexthop - could you please squash your commits to a single commit?

Signed-off-by: Darius Grassi <darius@nexthop.ai>
@darius-nexthop
darius-nexthop force-pushed the darius.lag-sflow-sample-attrs branch from 0acebd5 to d7424ce Compare October 23, 2026 16:25
@darius-nexthop

Copy link
Copy Markdown
Contributor Author

@darius-nexthop - could you please squash your commits to a single commit?

@tjchadaga I've squashed them, if you can please retrigger the Azure pipeline now. Thanks.

@tjchadaga

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@tjchadaga
tjchadaga merged commit e3080d0 into opencomputeproject:master Oct 23, 2026
3 checks passed
tjchadaga pushed a commit that referenced this pull request Oct 23, 2026
Signed-off-by: Darius Grassi <darius@nexthop.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed PR is discussed in SAI Meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants