sonic-buildimage/device
Stephen Sun 5c91f233ef
[Reclaim buffer][202106] Reclaim unused buffers by applying zero buffer profiles (#9062)
This is to backport community PR #8768 to 202106 branch

Why I did it
Support zero buffer profiles
Add buffer profiles and pool definition for zero buffer profiles
Support applying zero profiles on INACTIVE PORTS
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
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
 - 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
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.
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

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
Regression test.
Unit test in sonic-cfggen
Run regression test and manually test.
2021-12-13 10:51:50 -08:00
..
accton [AS5835-54x] Add get_status api and fix bug to fan.py (#7784) 2021-06-03 08:43:26 -07:00
alphanetworks [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
arista [202106]Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9293) 2021-11-17 20:58:25 -08:00
barefoot [show] add platform components in Newport, Montara, Mavericks for fix incomprehensible firmware Error print (#8690) 2021-09-26 21:37:01 -07:00
broadcom [202106]Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9293) 2021-11-17 20:58:25 -08:00
celestica [202106]Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9293) 2021-11-17 20:58:25 -08:00
centec [Centec][arm64] support new board E530-48s4x and E530-24x2q (#7189) 2021-05-01 10:37:07 -07:00
cig [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
common/pddf/plugins [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
dell [202106]Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9293) 2021-11-17 20:58:25 -08:00
delta [BCM Config] Update TD3 bcm.config files to use ISSU capable premium CANCUN 6.4.1 (#6651) 2021-02-02 21:48:26 -08:00
facebook/x86_64-facebook_wedge100-r0 In SAI 3.5 by default we are supporting 256 Group with 64 Memeber each. (#5400) 2020-09-22 11:21:12 -07:00
ingrasys [yang] update yang model, add autoneg to sonic-port (#5963) 2021-03-30 08:27:58 -07:00
inventec [yang] update yang model, add autoneg to sonic-port (#5963) 2021-03-30 08:27:58 -07:00
juniper [platform] Update QSFP method name 'parse_qsfp_dom_capability' -> 'parse_dom_capability' (#6695) 2021-02-05 14:41:05 -08:00
marvell [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
mellanox [Reclaim buffer][202106] Reclaim unused buffers by applying zero buffer profiles (#9062) 2021-12-13 10:51:50 -08:00
mitac/x86_64-mitac_ly1200_b32h0_c3-r0 [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
nokia [Nokia ixs7215] Add new platform capabilities to platform.json (#9032) 2021-11-14 15:15:56 -08:00
pegatron/x86_64-pegatron_porsche-r0 [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
quanta [Quanta] Add and update platform and device files (#6971) 2021-06-21 09:24:41 -07:00
ragile/x86_64-ragile_ra-b6510-48v8c-r0 [Platform/Ragile] Support RA-B6510-48v8c platform (#7620) 2021-06-03 10:51:01 -07:00
ruijie/x86_64-ruijie_b6510-48vs8cq-r0 [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
virtual/x86_64-kvm_x86_64-r0 [multi-asic][vs]: Add context_config.json files for multi-asic vs (#7697) 2021-06-01 10:18:26 -07:00
wnc/x86_64-wnc_osw1800-r0 [yang] update yang model, add autoneg to sonic-port (#5963) 2021-03-30 08:27:58 -07:00