Skip to content

[vslib]: hostif enum capability query API support#1586

Merged
saiarcot895 merged 3 commits intosonic-net:masterfrom
rminnikanti:neighbor_miss
Jun 10, 2025
Merged

[vslib]: hostif enum capability query API support#1586
saiarcot895 merged 3 commits intosonic-net:masterfrom
rminnikanti:neighbor_miss

Conversation

@rminnikanti
Copy link
Copy Markdown
Contributor

@rminnikanti rminnikanti commented Apr 22, 2025

What I did

vslib support for hostif trap object - SAI_OBJECT_TYPE_HOSTIF_TRAP,
attribute - SAI_HOSTIF_TRAP_ATTR_TRAP_TYPE
Implementation returns all trap types as supported.

Why I did

Details in HLD: sonic-net/SONiC#1943

How I verified it

Verified with UT and DVS

Signed-off-by: Ravi Minnikanti rminnikanti@marvell.com

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented Apr 23, 2025

please add unittests to satisfy code coverage

@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).

@rminnikanti
Copy link
Copy Markdown
Contributor Author

@kcudnik @prsunny I added unittest and code coverage is passing now. Can you please review?

kcudnik
kcudnik previously approved these changes Apr 24, 2025
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

kcudnik
kcudnik previously approved these changes May 5, 2025
@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented May 5, 2025

could you also add unittests to cover this case ?

@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).

@rminnikanti
Copy link
Copy Markdown
Contributor Author

could you also add unittests to cover this case ?

@kcudnik I added missing UT also for DEBUG_COUNTER. Can you please check now?

@rminnikanti
Copy link
Copy Markdown
Contributor Author

rminnikanti commented May 27, 2025

@kcudnik Some of the PR checks are getting cancelled. All checks were passing a few days ago on this PR, but they started failing after I rebased the branch. Could you please help look into this?

PR checks cancellation reason:

##[error]No config name or imagelabel provided in request
##[error]The remote provider was unable to process the request.

@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented May 27, 2025

this is due image ubuntu 20.04 is not available any more, i fixed it here:#1603

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

1. vslib support for SAI_OBJECT_TYPE_HOSTIF_TRAP,
   attribute - SAI_HOSTIF_TRAP_ATTR_TRAP_TYPE
2. Added UT for SAI_OBJECT_TYPE_HOSTIF_TRAP
3. Added UT for SAI_OBJECT_TYPE_DEBUG_COUNTER

HLD: sonic-net/SONiC#1943

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Added unittest comments to satisfy PR checks.

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Copy Markdown
Contributor

prsunny commented Jun 9, 2025

@saiarcot895 , could you please merge this?

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895 saiarcot895 merged commit d24b313 into sonic-net:master Jun 10, 2025
15 checks passed
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202505: #1620

mssonicbld added a commit to mssonicbld/sonic-swss that referenced this pull request Aug 5, 2025
**What I did**

- Added neighbor_miss trap type support
- enum capability query for hostif trap type in copporch.cpp
- Added hw_status field to COPP_TRAP_TABLE table in state_db

**Why I did it**

HLD: [sonic-net/SONiC#1943](sonic-net/SONiC#1943)

**How I verified it**

Verified with test_copp.py DVS test
Verified on Sonic switch with and without neighbor_miss trap support by vendorSAI.

**Details if related**

PR Dependencies:

- Depends on: sonic-net/sonic-swss-common#1010
- Depends on: sonic-net/sonic-sairedis#1586

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
mssonicbld added a commit to sonic-net/sonic-swss that referenced this pull request Aug 7, 2025
**What I did**

- Added neighbor_miss trap type support
- enum capability query for hostif trap type in copporch.cpp
- Added hw_status field to COPP_TRAP_TABLE table in state_db

**Why I did it**

HLD: [sonic-net/SONiC#1943](sonic-net/SONiC#1943)

**How I verified it**

Verified with test_copp.py DVS test
Verified on Sonic switch with and without neighbor_miss trap support by vendorSAI.

**Details if related**

PR Dependencies:

- Depends on: sonic-net/sonic-swss-common#1010
- Depends on: sonic-net/sonic-sairedis#1586

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
mssonicbld added a commit to mssonicbld/sonic-swss.msft that referenced this pull request Aug 20, 2025
**What I did**

- Added neighbor_miss trap type support
- enum capability query for hostif trap type in copporch.cpp
- Added hw_status field to COPP_TRAP_TABLE table in state_db

**Why I did it**

HLD: [sonic-net/SONiC#1943](sonic-net/SONiC#1943)

**How I verified it**

Verified with test_copp.py DVS test
Verified on Sonic switch with and without neighbor_miss trap support by vendorSAI.

**Details if related**

PR Dependencies:

- Depends on: sonic-net/sonic-swss-common#1010
- Depends on: sonic-net/sonic-sairedis#1586

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
mssonicbld added a commit to Azure/sonic-swss.msft that referenced this pull request Aug 20, 2025
**What I did**

- Added neighbor_miss trap type support
- enum capability query for hostif trap type in copporch.cpp
- Added hw_status field to COPP_TRAP_TABLE table in state_db

**Why I did it**

HLD: [sonic-net/SONiC#1943](sonic-net/SONiC#1943)

**How I verified it**

Verified with test_copp.py DVS test
Verified on Sonic switch with and without neighbor_miss trap support by vendorSAI.

**Details if related**

PR Dependencies:

- Depends on: sonic-net/sonic-swss-common#1010
- Depends on: sonic-net/sonic-sairedis#1586

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
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.

8 participants