[SRv6] add MySID counters support#3601
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2d627a5 to
97d4101
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Depends on: sonic-net/sonic-swss-common#1005 |
| return IpAddress(ip_addr); | ||
| } | ||
|
|
||
| string Srv6Orch::getMySidCounterKey(const sai_my_sid_entry_t& sai_entry) const |
There was a problem hiding this comment.
The MY_SID entry in SAI already has block_len/node_len/func_len, why do we need to collect them from locator_cfg?
There was a problem hiding this comment.
That's correct. This is the getMySidEntryLocatorCfg():
sonic-swss/orchagent/srv6orch.cpp
Lines 92 to 100 in 492a85a
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
21204e2 to
d88f23b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d88f23b to
573de80
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This pull request extends the SRv6 orchestration functionality to support MySID counters using the flex counter infrastructure. Key changes include new test functions for MySID counters in tests/test_flex_counters.py, added methods and members in Srv6Orch to manage MySID counters in orchagent/srv6orch.{h,cpp}, and updates to flex counter mappings in orchagent/flexcounterorch.cpp and related flex counter manager files.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_flex_counters.py | Added pre/post test functions for SRv6 MySID counters |
| orchagent/srv6orch.h | Introduced new method prototypes and a counter member for MySID entries |
| orchagent/srv6orch.cpp | Implemented MySID counter functions, timer-based updates, and counter state management |
| orchagent/flexcounterorch.cpp | Updated counter mapping to include SRv6 and trigger SRv6 counter state changes |
| orchagent/flex_counter/flex_counter_manager.h | Added SRV6 as a new counter type |
| orchagent/flex_counter/flex_counter_manager.cpp | Mapped the new SRV6 counter type to its corresponding counter ID list macro |
| initializeCounters(); | ||
| } | ||
|
|
||
| Srv6Orch::~Srv6Orch() |
There was a problem hiding this comment.
Consider freeing m_counter_update_timer (allocated on line 138) in the destructor to prevent a potential memory leak. Alternatively, using a smart pointer for managing the timer could improve resource management.
748b2f8 to
94656ae
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
94656ae to
e5d283f
Compare
e5d283f to
762a9bd
Compare
* query SAI capability to check if SRv6 MySID counter is supported * support for SRv6 MySID counter utilizing flex counter infrastructure * extend vs test test_flex_counters.py
Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
762a9bd to
0768615
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Cherry-pick PR to msft-202412: |
|
Cherry-pick PR to 202505: #3684 |
* SRv6: add MySID counters support What I did Extended srv6orch to support SRv6 MySID counters (utilizing flex counter infrastructure) Why I did it To support SRv6 MySID counters
* SRv6: add MySID counters support What I did Extended srv6orch to support SRv6 MySID counters (utilizing flex counter infrastructure) Why I did it To support SRv6 MySID counters
* SRv6: add MySID counters support What I did Extended srv6orch to support SRv6 MySID counters (utilizing flex counter infrastructure) Why I did it To support SRv6 MySID counters
* SRv6: add MySID counters support What I did Extended srv6orch to support SRv6 MySID counters (utilizing flex counter infrastructure) Why I did it To support SRv6 MySID counters Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
What I did
Extended srv6orch to support SRv6 MySID counters (utilizing flex counter infrastructure)
Why I did it
To support SRv6 MySID counters
How I verified it
New test in test_flex_counters.py
Details if related