Skip to content

Yang model additions for PFC Stat History#21848

Merged
yxieca merged 1 commit intosonic-net:masterfrom
peterbailey-arista:master
Jul 31, 2025
Merged

Yang model additions for PFC Stat History#21848
yxieca merged 1 commit intosonic-net:masterfrom
peterbailey-arista:master

Conversation

@peterbailey-arista
Copy link
Contributor

@peterbailey-arista peterbailey-arista commented Feb 25, 2025

New pfc_stat_history leaf attribute for toggling history estimation per-interface in CONFIG_DB

Why I did it

PFC Historical Statistics feature sonic-net/SONiC#1904

Work item tracking

#21847

How I did it

How to verify it

  • Run the test cases in tests/ and ensure they pass.
  • Deploy the changes to a SONiC device and verify the configuration and monitoring functionality using CLI commands.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

  • 202411

Description for the changelog

Addition of PFC_STAT_HISTORY table and Flex Counter group.

Link to config_db schema for YANG module changes

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@peterbailey-arista peterbailey-arista marked this pull request as ready for review April 11, 2025 17:28
Copy link
Contributor

Choose a reason for hiding this comment

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

Why doesn't it catch error for missing leafref in ifname: Ethernet4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While I was simply following the example of the other tests, I believe it is because Test_yang_models::runExceptionTest only verifies that each eStr defined in the test case is found in the exceptions from parsing the input.
So from my understanding of the code, it's likely that there would be a missing leafref and possibly any number of other exceptions but the test case passes so long as all exceptions defined in eStr were found at least once.

In my case I am only verifying that "pfc_stat_history must be either enable or disable" is shown and not any other exceptions.

@peterbailey-arista
Copy link
Contributor Author

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 21848 in repo sonic-net/sonic-buildimage

@peterbailey-arista
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@peterbailey-arista
Copy link
Contributor Author

@ganglyu or @wen587 are you able to review this PR or suggest reviewers I can ping for this and for the other related PRs for this feature? They are listed at sonic-net/SONiC#1904 (comment)

Let me know, thanks!

@vmittal-msft vmittal-msft self-requested a review June 14, 2025 01:44
@vmittal-msft
Copy link
Contributor

@peterbailey-arista As per my understanding, this is verifying port level configuration. How about global config validation ?

@peterbailey-arista
Copy link
Contributor Author

@peterbailey-arista As per my understanding, this is verifying port level configuration. How about global config validation ?

@vmittal-msft The feature configuration is all at the port level, you enable history on ports individually in the same way the PFCWD is started on ports individually. Hopefully I've understood your question but there is no global configuration to do - global configurations are handled through the PFCWD. For example, polling time is simply the PFCWD's polling time

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Contributor

@rlhui @yxieca please help merge.

@peterbailey-arista
Copy link
Contributor Author

@vmittal-msft Are we able to follow up on merging this? Thanks!

@vmittal-msft
Copy link
Contributor

@yxieca @rlhui please help merge.

@yxieca yxieca merged commit ad5d83b into sonic-net:master Jul 31, 2025
20 checks passed
@yejianquan
Copy link
Contributor

Hi @vmittal-msft , I can see the feature sonic-net/SONiC#1904 is moved to 202511 release.
Hence delete the request label for 202505 release,
please let me know this is needed for 202505

ccroy-arista pushed a commit to ccroy-arista/sonic-buildimage that referenced this pull request Aug 14, 2025
Why I did it
PFC Historical Statistics feature sonic-net/SONiC#1904

Work item tracking
sonic-net#21847

How to verify it
Run the test cases in tests/ and ensure they pass.
Deploy the changes to a SONiC device and verify the configuration and monitoring functionality using CLI commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants