Add libsai RedisInterface for link event damping.#1331
Add libsai RedisInterface for link event damping.#1331Ashish1805 wants to merge 1 commit intosonic-net:masterfrom
Conversation
bbd506e to
84655fc
Compare
|
@Junchao-Mellanox for review. |
|
@kcudnik looks like swss pytest is failing - it seems unrelated to my changes. Any idea how to fix the swss pytest? |
|
those vstests are sometime flaky so dont worry about that |
|
@kcudnik I have updated the PR as per review comment. can you please review it when you get a chance? Thank you. |
629934b to
f47c05d
Compare
|
please fix build erros and code coverage |
2399261 to
ec5cf30
Compare
|
@kcudnik Added the code coverage but I see PR is failing for 2 tests during |
in ~/sonic-sairedis/.azure-pipelines/build-template.yml seems like syslog service restart failed but why, no clue, we would need to look into syslog on pipeline but i dont know how :D maybe update buitld template to do "tail -n 100 /var/log/syslog ? after restaret command ? |
6aa7b5a to
5dfe7bf
Compare
|
/AzurePipelines run |
|
Commenter does not have sufficient privileges for PR 1331 in repo sonic-net/sonic-sairedis |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- This supports the link event damping config and algorithm set API. - Sends the link event damping config from libsai to syncd main thread. HLD: sonic-net/SONiC#1071 Signed-off-by: Ashish Singh <[email protected]>
5dfe7bf to
6f5b983
Compare
| if ((objectType != SAI_OBJECT_TYPE_PORT) || (attr == nullptr) || (attr->id < SAI_PORT_ATTR_CUSTOM_RANGE_START)) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| return true; |
There was a problem hiding this comment.
you can turn this to 1 single line by reversing condition
| if (m_syncMode) | ||
| { | ||
| swss::KeyOpFieldsValuesTuple kco; | ||
| auto status = m_communicationChannel->wait(REDIS_ASIC_STATE_COMMAND_DAMPING_CONFIG_SET, kco); | ||
|
|
||
| m_recorder->recordGenericSetResponse(status); | ||
|
|
||
| return status; | ||
| } |
There was a problem hiding this comment.
make this api always synchronous, async mode is just for create/remove/set operations all other apis should be synchronous
|
Hi @Ashish1805 and @kcudnik, This PR has been inactive for nearly 2 years. I'm picking up the link event damping feature and plan to open a new PR that supersedes this one, addressing all outstanding review comments:
Will credit @Ashish1805 as original author. See also my comment on #1334 regarding the overall design clarification. |
|
you have conflicts and didnt address comments last time |
HLD: sonic-net/SONiC#1071