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

[Dynamic buffer calc] Support dynamic buffer calculation #361

Merged
merged 12 commits into from
Dec 2, 2020

Conversation

stephenxs
Copy link
Collaborator

  1. Database schema updates.
  2. Move the json file parsing from swss to swss-common.

@stephenxs stephenxs marked this pull request as ready for review July 7, 2020 05:44
@stephenxs stephenxs changed the title Dynamic buffer calculation [Dynamic buffer calc] Support dynamic buffer calculation Aug 31, 2020
common/schema.h Outdated Show resolved Hide resolved
common/schema.h Outdated Show resolved Hide resolved
common/schema.h Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
Stephen Sun and others added 4 commits November 16, 2020 10:38
Signed-off-by: Stephen Sun <stephens@mellanox.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Copy link
Collaborator

@liat-grozovik liat-grozovik left a comment

Choose a reason for hiding this comment

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

Is there any other doc file which schema should be updated as well?

common/json.cpp Show resolved Hide resolved
common/json.h Show resolved Hide resolved
common/schema.h Show resolved Hide resolved
Signed-off-by: Stephen Sun <stephens@nvidia.com>
liat-grozovik
liat-grozovik previously approved these changes Nov 16, 2020
@liat-grozovik
Copy link
Collaborator

@neetha please review and provide your feedback. this PR is needed to be the first to be merged so other related PRs can be tested properly in Jenkins PR CI

neethajohn
neethajohn previously approved these changes Nov 20, 2020
liat-grozovik
liat-grozovik previously approved these changes Nov 24, 2020
liat-grozovik
liat-grozovik previously approved these changes Nov 24, 2020
@liat-grozovik
Copy link
Collaborator

@neethajohn your approval was lost with the last push. can you please approve and merge?

neethajohn
neethajohn previously approved these changes Nov 24, 2020
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

Signed-off-by: Stephen Sun <stephens@nvidia.com>
common/json.cpp Outdated Show resolved Hide resolved
common/json.cpp Outdated Show resolved Hide resolved
Signed-off-by: Stephen Sun <stephens@nvidia.com>
common/json.cpp Outdated Show resolved Hide resolved
Signed-off-by: Stephen Sun <stephens@nvidia.com>
- logic_error for json syntax errors
- bas_alloc for insufficient memory

Signed-off-by: Stephen Sun <stephens@nvidia.com>
common/json.cpp Outdated Show resolved Hide resolved
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@qiluo-msft can you please merge?

@qiluo-msft qiluo-msft merged commit cf9cc37 into sonic-net:master Dec 2, 2020
@stephenxs stephenxs deleted the dynamic-buffer-calculation branch December 2, 2020 22:14
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Dec 13, 2020
**- Why I did it**
To support dynamic buffer calculation.
This PR also depends on the following PRs for sub modules
- [sonic-swss: [buffermgr/bufferorch] Support dynamic buffer calculation #1338](sonic-net/sonic-swss#1338)
- [sonic-swss-common: Dynamic buffer calculation #361](sonic-net/sonic-swss-common#361)
- [sonic-utilities: Support dynamic buffer calculation #973](sonic-net/sonic-utilities#973)

**- How I did it**
1. Introduce field `buffer_model` in `DEVICE_METADATA|localhost` to represent which buffer model is running in the system currently:
    - `dynamic` for the dynamic buffer calculation model
    - `traditional` for the traditional model in which the `pg_profile_lookup.ini` is used
2. Add the tables required for the feature:
   - ASIC_TABLE in platform/\<vendor\>/asic_table.j2
   - PERIPHERAL_TABLE in platform/\<vendor\>/peripheral_table.j2
   - PORT_PERIPHERAL_TABLE on a per-platform basis in device/\<vendor\>/\<platform\>/port_peripheral_config.j2 for each platform with gearbox installed.
   - DEFAULT_LOSSLESS_BUFFER_PARAMETER and LOSSLESS_TRAFFIC_PATTERN in files/build_templates/buffers_config.j2
   - Add lossless PGs (3-4) for each port in files/build_templates/buffers_config.j2
3. Copy the newly introduced j2 files into the image and rendering them when the system starts
4. Update the CLI options for buffermgrd so that it can start with dynamic mode
5. Fetches the ASIC vendor name in orchagent:
   - fetch the vendor name when creates the docker and pass it as a docker environment variable
   - `buffermgrd` can use this passed-in variable
6. Clear buffer related tables from STATE_DB when swss docker starts
7. Update the src/sonic-config-engine/tests/sample_output/buffers-dell6100.json according to the buffer_config.j2
8. Remove buffer pool sizes for ingress pools and egress_lossy_pool
   Update the buffer settings for dynamic buffer calculation
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