Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stepanblyschak
Copy link
Contributor

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:

  1. First, tasks are processed one by one by corresponding process* methods which add the SAI operation with a context to a bulk buffer. Bulk buffers are split by DB operation.
  2. Bulk buffer is flushed to syncd using SAI bulk API, first DELETE operations are pushed in bulk then SET operations are pushed. Status code for each operation is updated in the task context structure.
  3. Lastly, corresponding 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

DEL happens first, then SET. Otherwise the order in bulk SET could be
different.

Signed-off-by: Stepan Blyschak <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@developfast
Copy link

Will review shortly

const auto tokens = tokenize(key, delimiter);
Port port;

for (const auto& portContext: task.ports)
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

VS tests fail due to bulk set not supported for PGs in init view in syncd:

ERR #syncd: :- run: Runtime error: :- processBulkQuadEventInInitViewMode: SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP is not supported in init view mode

Either need to add such support or disable bulk for systems that use init view

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.

4 participants