Skip to content

Conversation

@apoorv-arista
Copy link
Contributor

@apoorv-arista apoorv-arista commented Nov 17, 2025

HLD Link : fec-flr-hld

What I did

Added a secondary poll factor to the flex counter infrastructure in sonic-swss. The changes introduce a new secondary_poll_factor parameter across multiple orchestration modules including:

  • Modified flex counter manager to support secondary polling intervals
  • Updated buffer, COPP, debug counter, interface, PFC watchdog, and ports orchestration modules
  • Added default configuration for FLEX_COUNTER_DEFAULT_SECONDARY_POLL_FACTOR (set to 0)
  • Updated method signatures to accept and propagate the secondary poll factor

Why I did it

To provide more flexible and granular control over polling intervals for different counter groups in SONiC. This enhancement allows:

  • Different counter groups to have customized polling rates
  • Better performance tuning by adjusting poll frequencies based on specific monitoring needs
  • More efficient resource utilization by allowing less critical counters to be polled less frequently.

How I verified it

  • Integration tests verifying secondary poll factor behavior across different orchestration modules
  • Validation that default behavior (secondary_poll_factor = 0) maintains backward compatibility

Details if related

  • Files Modified: 15 files across the orchestration layer
  • Main Components Affected:
    • Flex counter infrastructure (flex_counter_manager.cpp/h)
    • Multiple orchestration modules (buffer, COPP, debug counter, interfaces, PFC watchdog, ports)
    • Port FLR Lua script (port_flr.lua)
  • Default Behavior: Secondary poll factor defaults to 0, ensuring no impact on existing configurations
  • Backward Compatibility: Changes maintain backward compatibility by using default values when secondary poll factor is not specified

Build Order

┌──────────────────────────────┐
│  sonic-swss-common (#1110)   │  ◄── Foundation (no dependencies)
└──────────────────────────────┘
         │                  
         │                  
         ├──────────────────────────┐
         │                          │
         │                          │
         v                          │
┌──────────────────────────────┐    │
│  sonic-sairedis (#1699)      │    │
│  depends on:                 │    │
│    - sonic-swss-common       │    │
└──────────────────────────────┘    │
         │                          │
         │                          │
         └──────────┬───────────────┘
                    │
                    v
         ┌──────────────────────────────┐
         │  sonic-swss (#4002)          │
         │  depends on:                 │
         │    - sonic-sairedis          │
         │    - sonic-swss-common       │
         └──────────────────────────────┘

Build Order (bottom-up):
sonic-swss-common (#1110) - build first
sonic-sairedis (#1699) - build second
sonic-swss (#4002) - build last
PR Merge Order: The PRs should be merged in the same order: #1110#1699#4002

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Collaborator

prsunny commented Nov 17, 2025

@apoorv-arista , please add link to HLD to this PR

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang sdszhang requested a review from prgeor November 20, 2025 06:02
@apoorv-arista
Copy link
Contributor Author

apoorv-arista commented Nov 27, 2025

The build pipelines for this PR are failing because they have interdependent changes.

I have updated the PR description with build order requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants