Skip to content

[DASH] Support trusted VNIs for appliance and ENI objects#3728

Merged
prsunny merged 18 commits intosonic-net:masterfrom
theasianpianist:trusted-vni
Jul 11, 2025
Merged

[DASH] Support trusted VNIs for appliance and ENI objects#3728
prsunny merged 18 commits intosonic-net:masterfrom
theasianpianist:trusted-vni

Conversation

@theasianpianist
Copy link
Copy Markdown
Contributor

What I did

  • Program trusted VNI info to SAI layer for appliance and ENI objects when available

Why I did it
As per sonic-net/SONiC#1911

How I verified it
Run the unit tests

Details if related

@theasianpianist theasianpianist requested a review from prsunny as a code owner June 25, 2025 11:15
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for trusted VNI programming across appliance and ENI objects by extending the SAI layer mocking and orchestration code. Key changes include:

  • Adding new SAI API calls and mocks for trusted VNIs.
  • Updating unit tests and orchagent functions to create and remove trusted VNI entries.
  • Extending protobuf utilities to convert trusted VNI values.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/mock_tests/ut_saihelper.cpp Adds SAI API query for trusted VNI.
tests/mock_tests/mock_sai_api.h Introduces new macros for entry API mocks for trusted VNI.
tests/mock_tests/mock_orchagent_main.h Declares the trusted VNI API pointer.
tests/mock_tests/mock_dash_orch_test.* Updates test helpers and adds tests for trusted VNI usage.
orchagent/saihelper.cpp Declares the trusted VNI API pointer.
orchagent/dash/pbutils.{h,cpp} Adds conversion function for trusted VNI ValueOrRange.
orchagent/dash/dashorch.{h,cpp} Implements creation and removal of trusted VNI entries.
Comments suppressed due to low confidence (1)

orchagent/dash/pbutils.cpp:105

  • The new conversion function 'to_sai(const dash::types::ValueOrRange&, sai_u32_range_t&)' lacks explicit unit tests for the error path when min > max. Consider adding tests to verify that invalid ranges are handled correctly.
        if (pb_range.range().min() > pb_range.range().max())

@theasianpianist
Copy link
Copy Markdown
Contributor Author

@mukeshmv fyi

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@theasianpianist
Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@theasianpianist
Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@theasianpianist theasianpianist requested a review from prsunny July 9, 2025 20:30
@theasianpianist
Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss.msft#107

bobby-nexthop pushed a commit to bobby-nexthop/sonic-swss that referenced this pull request Jul 24, 2025
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911
vivekrnv pushed a commit to vivekrnv/sonic-swss that referenced this pull request Aug 8, 2025
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911
theasianpianist added a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911

Signed-off-by: Lawrence Lee <[email protected]>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
…3728)

*[DASH] Support trusted VNIs for appliance and ENI objects (sonic-net#3728)
What I did
Program trusted VNI info to SAI layer for appliance and ENI objects when available
Why I did it
As per sonic-net/SONiC#1911

Signed-off-by: Baorong Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants