Skip to content

[Dynamic buffer calc] Support dynamic buffer calculation#361

Merged
qiluo-msft merged 12 commits intosonic-net:masterfrom
stephenxs:dynamic-buffer-calculation
Dec 2, 2020
Merged

[Dynamic buffer calc] Support dynamic buffer calculation#361
qiluo-msft merged 12 commits intosonic-net:masterfrom
stephenxs:dynamic-buffer-calculation

Conversation

@stephenxs
Copy link
Copy Markdown
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 force-pushed the dynamic-buffer-calculation branch from 75f9d45 to 2a5e8b9 Compare August 14, 2020 11:54
@stephenxs stephenxs changed the title Dynamic buffer calculation [Dynamic buffer calc] Support dynamic buffer calculation Aug 31, 2020
Comment thread common/schema.h Outdated
Comment thread common/schema.h Outdated
Comment thread common/schema.h Outdated
@stephenxs stephenxs force-pushed the dynamic-buffer-calculation branch from ee8c149 to 99024ce Compare September 12, 2020 13:54
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
@stephenxs stephenxs force-pushed the dynamic-buffer-calculation branch from 99024ce to 5dc96c2 Compare October 21, 2020 02:54
@stephenxs stephenxs force-pushed the dynamic-buffer-calculation branch from 695f07c to 4716472 Compare November 16, 2020 01:14
@stephenxs stephenxs force-pushed the dynamic-buffer-calculation branch from 4716472 to 4d06910 Compare November 16, 2020 02:39
@stephenxs stephenxs requested a review from neethajohn November 16, 2020 03:10
Copy link
Copy Markdown
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?

Comment thread common/json.cpp
Comment thread common/json.h
Comment thread common/schema.h
liat-grozovik
liat-grozovik previously approved these changes Nov 16, 2020
@liat-grozovik
Copy link
Copy Markdown
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

Comment thread common/json.cpp
neethajohn
neethajohn previously approved these changes Nov 20, 2020
liat-grozovik
liat-grozovik previously approved these changes Nov 24, 2020
@stephenxs stephenxs dismissed stale reviews from liat-grozovik and neethajohn via 3458442 November 24, 2020 10:59
liat-grozovik
liat-grozovik previously approved these changes Nov 24, 2020
@liat-grozovik
Copy link
Copy Markdown
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
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Copy link
Copy Markdown
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 <[email protected]>
@stephenxs stephenxs dismissed stale reviews from neethajohn and liat-grozovik via ca70649 December 1, 2020 00:48
@stephenxs stephenxs requested a review from qiluo-msft December 1, 2020 01:05
Comment thread common/json.cpp Outdated
Comment thread common/json.cpp Outdated
Signed-off-by: Stephen Sun <[email protected]>
@stephenxs stephenxs requested a review from qiluo-msft December 1, 2020 04:37
Comment thread common/json.cpp Outdated
@stephenxs stephenxs requested a review from qiluo-msft December 2, 2020 01:51
- logic_error for json syntax errors
- bas_alloc for insufficient memory

Signed-off-by: Stephen Sun <[email protected]>
Comment thread common/json.cpp Outdated
Signed-off-by: Stephen Sun <[email protected]>
@liat-grozovik
Copy link
Copy Markdown
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
prgeor pushed a commit to prgeor/sonic-swss-common that referenced this pull request Feb 27, 2025
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