-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BufferOrch] Use SAI bulk API to configure port, PG and queue #3452
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Stepan Blyschak <[email protected]>
DEL happens first, then SET. Otherwise the order in bulk SET could be different. Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Will review shortly |
const auto tokens = tokenize(key, delimiter); | ||
Port port; | ||
|
||
for (const auto& portContext: task.ports) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any capability check to query vendor SAI's bulk API implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required, please check https://github.com/jianyuewu/sonic-sairedis/blob/master/syncd/Syncd.cpp#L2186
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
VS tests fail due to bulk set not supported for PGs in init view in syncd:
Either need to add such support or disable bulk for systems that use init view |
What I did
Make use of SAI set bulk API to improve switch boot up performance, especially in warm-boot and fast-boot scenarios.
The general concept:
process*
methods which add the SAI operation with a context to a bulk buffer. Bulk buffers are split by DB operation.process*Post
methods are invoked to handle SAI status code and perform post set operations like enabling FC counter for a PG/queue upon success.This design allows re-use of all existing code that is written to handle one task at a time and a small change is needed to maintain task context persistence throughout steps 1-3.
Why I did it
To improve fast-boot/warm-boot convergence time.
How I verified it
Manual verification by booting up the T0 topology configuration and running basic tests with static and dynamic buffer models. Fast-boot tested and observed ~2 times improvement in buffer configuration time on 256 port system from 3 sec to 1.7 sec when syncd falls back to single SET API. A bigger improvement is expected with proper SAI driver bulk SET support.
Details if related