Skip to content

Comments

[hft]: Fix TAM type capability enable list#4075

Merged
prsunny merged 6 commits intosonic-net:masterfrom
Pterosaur:fix_tam_type_capability
Jan 5, 2026
Merged

[hft]: Fix TAM type capability enable list#4075
prsunny merged 6 commits intosonic-net:masterfrom
Pterosaur:fix_tam_type_capability

Conversation

@Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented Dec 19, 2025

What I did
Enable TAM type capability based on its type

Why I did it
The previous implementation was ambiguous

How I verified it
Check Azp

Details if related

Signed-off-by: Ze Gan <ganze718@gmail.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Ze Gan <ganze718@gmail.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur requested a review from r12f December 24, 2025 06:49
@Pterosaur
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur marked this pull request as ready for review December 28, 2025 22:24
@Pterosaur Pterosaur requested a review from prsunny as a code owner December 28, 2025 22:24
Copilot AI review requested due to automatic review settings December 28, 2025 22:24
Copy link

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 fixes the TAM (Telemetry and Monitoring) type capability enable list implementation to make it object-type specific rather than enabling all capabilities unconditionally. Previously, all telemetry capabilities (PORT_STATS, MMU_STATS, and OUTPUT_QUEUE_STATS) were enabled regardless of the object type being monitored, which was ambiguous. The new implementation conditionally enables only the relevant capabilities based on the SAI object type (PORT, BUFFER_POOL, INGRESS_PRIORITY_GROUP, or QUEUE).

Key changes:

  • Refactored C++ code to use conditional logic that enables capabilities based on object type
  • Updated test to verify at least one capability is enabled rather than requiring all capabilities

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
orchagent/high_frequency_telemetry/hftelprofile.cpp Replaced unconditional capability enablement with conditional logic based on SAI object type (PORT, BUFFER_POOL, INGRESS_PRIORITY_GROUP, QUEUE), adding error handling for unsupported types
tests/test_hft.py Added flexible validation to check that at least one TAM capability is enabled, accommodating the new object-type-specific capability enablement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Ze Gan <ganze718@gmail.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur force-pushed the fix_tam_type_capability branch from fd24ea9 to bd453f6 Compare December 30, 2025 23:49
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur force-pushed the fix_tam_type_capability branch from bd453f6 to 7d3b645 Compare December 31, 2025 06:12
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Ze Gan <ganze718@gmail.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur force-pushed the fix_tam_type_capability branch from c9429d4 to a7601ae Compare January 1, 2026 10:15
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@r12f r12f left a comment

Choose a reason for hiding this comment

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

the type mapping looks reasonable. approved.

@DavidZagury and @dgsudharsan for viz.

@prsunny prsunny merged commit 4b81a3b into sonic-net:master Jan 5, 2026
16 checks passed
@Pterosaur Pterosaur deleted the fix_tam_type_capability branch January 10, 2026 01:04
arpit-nexthop pushed a commit to nexthop-ai/sonic-swss that referenced this pull request Jan 21, 2026
This PR fixes the TAM (Telemetry and Monitoring) type capability enable list implementation to make it object-type specific rather than enabling all capabilities unconditionally. Previously, all telemetry capabilities (PORT_STATS, MMU_STATS, and OUTPUT_QUEUE_STATS) were enabled regardless of the object type being monitored, which was ambiguous. The new implementation conditionally enables only the relevant capabilities based on the SAI object type (PORT, BUFFER_POOL, INGRESS_PRIORITY_GROUP, or QUEUE).

Key changes:

Refactored C++ code to use conditional logic that enables capabilities based on object type
Updated test to verify at least one capability is enabled rather than requiring all capabilities
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-swss.msft#198

ganglyu pushed a commit to ganglyu/sonic-swss that referenced this pull request Jan 26, 2026
This PR fixes the TAM (Telemetry and Monitoring) type capability enable list implementation to make it object-type specific rather than enabling all capabilities unconditionally. Previously, all telemetry capabilities (PORT_STATS, MMU_STATS, and OUTPUT_QUEUE_STATS) were enabled regardless of the object type being monitored, which was ambiguous. The new implementation conditionally enables only the relevant capabilities based on the SAI object type (PORT, BUFFER_POOL, INGRESS_PRIORITY_GROUP, or QUEUE).

Key changes:

Refactored C++ code to use conditional logic that enables capabilities based on object type
Updated test to verify at least one capability is enabled rather than requiring all capabilities

Signed-off-by: ganglyu <glv@nvidia.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #4215

baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
This PR fixes the TAM (Telemetry and Monitoring) type capability enable list implementation to make it object-type specific rather than enabling all capabilities unconditionally. Previously, all telemetry capabilities (PORT_STATS, MMU_STATS, and OUTPUT_QUEUE_STATS) were enabled regardless of the object type being monitored, which was ambiguous. The new implementation conditionally enables only the relevant capabilities based on the SAI object type (PORT, BUFFER_POOL, INGRESS_PRIORITY_GROUP, or QUEUE).

Key changes:

Refactored C++ code to use conditional logic that enables capabilities based on object type
Updated test to verify at least one capability is enabled rather than requiring all capabilities

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.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.

5 participants