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

[Reclaim unused buffer] Support zero buffer profiles #80

Closed
wants to merge 13 commits into from

Conversation

stephenxs
Copy link
Owner

@stephenxs stephenxs commented Aug 11, 2021

Why I did it

Support zero buffer profiles

  1. Add buffer profiles and pool definition for zero buffer profiles
  2. Support applying zero profiles on INACTIVE PORTS
  3. Enable dynamic buffer manager to load zero pools and profiles from a JSON file

Signed-off-by: Stephen Sun stephens@nvidia.com

How I did it

  1. Add buffer profiles and pool definition for zero buffer profiles

    • If the buffer model is static:
      • Apply normal buffer profiles to admin-up ports
      • Apply zero buffer profiles to admin-down ports
    • If the buffer model is dynamic:
      • Apply normal buffer profiles to all ports
      • buffer manager will take care when a port is shut down
  2. Update buffers_config.j2 to support INACTIVE PORTS by extending the existing macros to generate the various buffer objects, including PGs, queues, ingress/egress profile lists

    • Originally, all the macros to generate the above buffer objects took active ports only as an argument
    • Now that buffer items need to be generated on inactive ports as well, an extra argument representing the inactive ports need to be added
    • To be backward compatible, a new series of macros are introduced to take both active and inactive ports as arguments
    • The original version (with active ports only) will be checked first. If it is not defined, then the extended version will be called
    • Only vendors who support zero profiles need to change their buffer templates
  3. Enable buffer manager to load zero pools and profiles from a JSON file:

    • The JSON file is provided on a per-platform basis
    • It is copied from platform/<vendor> folder to /usr/share/sonic/temlates folder in compiling time and rendered when the swss container is being created.
  4. To make code clean and reduce redundant code, extract common macros from buffer_defaults_t{0,1}.j2 of all SKUs to two common files:

    • One in Mellanox-SN2700-D48C8 for single ingress pool mode
    • The other in ACS-MSN2700 for double ingress pool mode

    Those files of all other SKUs will be symbol link to the above files

  5. Update sonic-cfggen test accordingly:

    • Adjust example output file of JSON template for unit test
    • Add unit test in for Mellanox's new buffer templates.

How to verify it

  1. Regression test.
  2. Unit test in sonic-cfggen

Run regression test and manually test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

1. Add buffer profiles and pool definition for zero buffer profiles
   - If buffer model is static:
      - Apply normal buffer profiles to admin-up ports
      - Apply zero buffer profiles to admin-down ports
   - If buffer model is dynamic:
      - Apply normal buffer profiles to all ports
      - buffer manager will take care when a port is shutdown
2. To make code clean and reduce redundant code, extract common macros from buffer_defaults_t{0,1}.j2 of all SKUs to two common files:
    - one in Mellanox-SN2700 for single ingress pool mode
    - the other in ACS-MSN2700 for double ingress pool mode
   Those files of all other SKUs will be symbol link to the above files
3. Adjust example output file of json template for unit test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs changed the title Support zero buffer profiles [Reclaim unused buffer] Support zero buffer profiles Aug 11, 2021
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Remvoe ingress_lossless_pool.xoff from generic SKU
Fix errors when inactive ports set is empty

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
1. Use one item for all queues if the port is admin down
2. Fix errors in buffers_defaults_t1.j2 in 2700

Signed-off-by: Stephen Sun <stephens@nvidia.com>
….sh accordingly

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Adjust test cases accordingly.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs closed this Sep 15, 2021
stephenxs pushed a commit that referenced this pull request Mar 21, 2022
e56e9b4 Fix CVE-2021-3121 warning (#96)
bf1be4f [ci]: Support code diff coverage threshold 50% (#94)
64e516c Ported Marvell armhf build on x86 for debian buster to use cross-compilation instead of qemu emulation (#80)
e426388 [ci]: Support azp code coverage (#87)
stephenxs pushed a commit that referenced this pull request Mar 25, 2022
e56e9b4 Fix CVE-2021-3121 warning (#96)
bf1be4f [ci]: Support code diff coverage threshold 50% (#94)
64e516c Ported Marvell armhf build on x86 for debian buster to use cross-compilation instead of qemu emulation (#80)
e426388 [ci]: Support azp code coverage (#87)
stephenxs pushed a commit that referenced this pull request Jun 14, 2022
[sonic-linkmgrd][master] Submodule Update

9c8a16e Jing Zhang Sun Jun 5 08:27:07 2022 -0700 Separate I2C mux state probing and gRPC forwarding state probing (#86)
491c4ee Longxiang Lyu Sun Jun 5 23:26:19 2022 +0800 Fix peer mux wait back off factor (#84)
a0b6b14 Jing Zhang Wed Jun 1 10:33:12 2022 -0700 Revert "Update log level for mux probing and mux state chance (#23)" (#85)
3c2b546 Jing Zhang Tue May 31 10:14:42 2022 -0700 Add default route support to active-active state machine (#78)
6fa892e Longxiang Lyu Fri May 27 09:15:06 2022 +0800 Degrade LinkProberStateMachineBase virtual function logging level (#80)
7b695ca Longxiang Lyu Fri May 27 09:14:02 2022 +0800 Fix mux wait timer and peer mux wait timer (#81)
stephenxs pushed a commit that referenced this pull request Jul 15, 2022
linkmgrd:
* 3c2b546 2022-05-31 | Add default route support to `active-active` state machine (#78) (github/202205, master, 202205) [Jing Zhang]
* 6fa892e 2022-05-27 | Degrade `LinkProberStateMachineBase` virtual function logging level (#80) [Longxiang Lyu]
* 7b695ca 2022-05-27 | Fix mux wait timer and peer mux wait timer (#81) [Longxiang Lyu]

platform-daemons:
* 0d90023 2022-05-31 | grpc client implementation for active-active dualtor (sonic-net#248) (github/master, github/202205, master, 202205) [vdahiya12]
* 6b8bf69 2022-05-27 | [ycabled] Fix some syntax warnings in ycabled (sonic-net#263) [vdahiya12]
* 2bcf936 2022-05-24 | [ycabled] fix the posting for mux_cable_static_info per downlink when ycabled is spawned; synchronizing executing Telemetry API (sonic-net#257) [vdahiya12]
* ce217c0 2022-04-25 | Include changes from xcvr_api in transceiver_info table (sonic-net#253) [qinchuanares]
* e0f8a35 2022-04-22 | Fix checkReplyType failed issue via recreating xcvr_table_helper on forking subprocess (sonic-net#255) [Stephen Sun]

platform-common:
* f575a40 2022-05-24 | [Credo][Ycable] changes for synchronizing executing Telemetry API's when mux toggle is inprogress (sonic-net#280) (github/202205, master, 202205) [vdahiya12]
* b043372 2022-05-11 | [sonic_ssd] Nokia-7215: "show platform ssdhealth" not showing health percent (sonic-net#279) [bill-nokia]
* d62d3d6 2022-05-04 | [CMIS]Fix low-power to high power mode transition (sonic-net#268) [Prince George]
* f918125 2022-05-02 | [syseeprom] Enable display of vendor extension TLV content (sonic-net#270) [dflynn-Nokia]
* 4e08440 2022-04-14 | [Credo][Ycable] improve logging for Server Powered off/Faulty cables (sonic-net#272) [vdahiya12]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
stephenxs pushed a commit that referenced this pull request Feb 27, 2024
…e latest HEAD automatically (sonic-net#18168)

#### Why I did it
src/wpasupplicant/sonic-wpa-supplicant
```
* d41110905 - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #80 from wumiaont/master (4 days ago) [Kamil Cudnik]
* 7406f4ba4 - Fix compile issues with debian bookworm (10 days ago) [wumiaont]
* caed4ef71 - Fix compile issues with bookworm and openssl 3.0 (10 days ago) [wumiaont]
```
#### How I did it
#### How to verify it
#### Description for the changelog
stephenxs pushed a commit that referenced this pull request May 14, 2024
…utomatically (sonic-net#18900)

#### Why I did it
src/sonic-host-services
```
* aa84129 - (HEAD -> master, origin/master, origin/HEAD) Updated tacacs test (#123) (17 hours ago) [ycoheNvidia]
* 9e6404c - Add LDAP feature support (#80) (6 days ago) [davidpil2002]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

2 participants