sonic-buildimage/src
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
..
bash [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
dhcpmon [DHCPv6 Relay] [202106] Fix kernel memory allocation, log verbosity and dhcpmon bugs (#8975) 2021-10-19 05:46:08 -07:00
ethtool [arm] support compile sonic arm image on arm server (#7285) 2021-04-18 08:17:57 -07:00
flashrom Flashrom refactoring for broadcom platforms (#7693) 2021-06-22 15:29:21 -07:00
gobgp Update go version to 1.11.2 for gobgp and telemetry (#2230) 2018-11-09 21:56:39 -08:00
hiredis [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iccpd MCLAG enhacements ICCPd initial code commit (#4819) 2021-08-19 22:14:09 -07:00
ifupdown2 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
initramfs-tools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iproute2 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iptables [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
isc-dhcp [DHCPv6 Relay] [202106] Fix kernel memory allocation, log verbosity and dhcpmon bugs (#8975) 2021-10-19 05:46:08 -07:00
ixgbe Reorganize .gitignore files (#4707) 2020-06-09 21:04:55 -07:00
kdump-tools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
libnl3 [MPLS][libnl3] libnl patches for supporting MPLS 2021-06-16 15:08:23 -07:00
libteam Increase min-links limit for portchannel from 128 to 1024. (#7265) 2021-10-14 15:29:57 -07:00
libyang Export libyang API "lyd_check_mandatory_tree" for Management framework (CVL) (#5714) 2021-01-14 16:47:57 -08:00
libyang1 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
lldpd [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
lm-sensors [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
monit [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
mpdecimal [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
ntp [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
openssh [openssh]: move build dep installation to sonic-slave-buster (#8381) 2021-08-20 16:07:02 +08:00
ptf@36a3e3d9ac [docker-sonic-mgmt] install ptf framework in mgmt container and upgrade ptf (#3239) 2019-07-30 10:19:48 -07:00
radius [radius]: RADIUS Management User Authentication (#7551) 2021-06-14 07:57:01 -07:00
redis [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
redis-dump-load@7585497951 [redis-dump-load] Update submodule (#5215) 2020-08-19 11:23:42 -07:00
redis-dump-load.patch [build] Use pip to install setup.py dependency instead of python setup.py install (#8997) 2021-10-27 22:18:58 -07:00
sflow [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
smartmontools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
snmpd [build] Always use -j1 for libsnmp to avoid race condition (#8324) 2021-08-06 20:53:54 -07:00
socat [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
sonic-bgpcfgd [frrcfgd][bgpcfgd] Add portchannel support (#8911) 2021-10-20 18:15:12 -07:00
sonic-build-hooks [build] Fix reproducible build issues (#8548) 2021-09-02 15:37:42 -07:00
sonic-config-engine [Reclaim buffer][202106] Reclaim unused buffers by applying zero buffer profiles (#9062) 2021-12-13 10:51:50 -08:00
sonic-ctrmgrd Revert "[Kubernetes]: The kube server could be used as http-proxy for docker (#7469)" (#8023) 2021-06-29 18:43:53 -07:00
sonic-dbsyncd@df46ed418e [submodule update] sonic-db-syncd (#7225) 2021-04-03 07:36:11 -07:00
sonic-device-data [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
sonic-frr [FRR]: Upgrade FRR to frr-7.5.1-s1 tag (#8443) 2021-08-25 12:16:19 -07:00
sonic-frr-mgmt-framework [frrcfgd][bgpcfgd] Add portchannel support (#8911) 2021-10-20 18:15:12 -07:00
sonic-host-services [hostcfgd] [202106] Fixed the brief blackout in hostcfgd using SubscriberStateTable (#9031) 2021-10-29 08:55:59 -07:00
sonic-host-services-data Fix delay type from boot instead of unit activation (#8895) 2021-10-20 18:13:52 -07:00
sonic-linux-kernel@563666e352 Update kernel pointer (#9054) 2021-10-26 13:33:07 +03:00
sonic-mgmt-common@86c1108125 [sonic-mgmt-common] Update submodule (#6129) 2020-12-08 04:31:16 -08:00
sonic-mgmt-framework@3c3384cec8 Mgmt reorg -- submodule and build rules for sonic-mgmt-common (#4765) 2020-06-22 16:01:55 -07:00
sonic-platform-common@1d3a810797 Update sonic-platform-common with following commits 2021-08-19 21:33:22 -07:00
sonic-platform-daemons@25b32ecf68 Update sonic-platform-daemons 2021-10-14 14:50:24 -07:00
sonic-py-common [multi-asic][cli][chassis-db] Avoid connecting to chassis db when cli commands are executed from linecards (#8065) 2021-09-26 21:35:39 -07:00
sonic-py-swsssdk@2cd6236849 Update sonic-py-swsssdk submodule 2021-10-05 23:38:03 -07:00
sonic-restapi@8d09602a9e [submodule]: Update restapi (#7213) 2021-04-01 22:40:55 -07:00
sonic-sairedis@3e8f83b308 Update sonic-sairedis submodule 2021-10-05 23:39:21 -07:00
sonic-snmpagent@7e46eb1654 Update sub-modules 2021-11-14 15:57:36 -08:00
sonic-swss@ac452823d3 submodule update swss 2021-12-08 00:25:09 +00:00
sonic-swss-common@1b8b9f43d7 Update sonic-swss-common submodule 2021-10-03 19:02:54 -07:00
sonic-telemetry@6df988cce7 Telemetry submodule update (#7864) 2021-06-14 18:22:49 -07:00
sonic-utilities@951485792e Update sonic-utilities submodule 2021-12-01 19:21:45 -08:00
sonic-yang-mgmt Add SONiC YANGs for Management Port, Management Interface, Management VRF and NTP. (#7252) 2021-06-18 11:47:45 -07:00
sonic-yang-models Allow interface type value none (#9098) 2021-11-05 19:13:33 -07:00
sonic-ztp@4475750df0 [sonic-ztp] submodule update (#7984) 2021-06-27 09:56:27 +03:00
swig [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
system-health [system-health] [202106] No longer check critical process/service status via monit (#9366) 2021-12-01 10:26:06 -08:00
systemd-sonic-generator [multi-asic] Fixed systemd-sonic-generator for multi-asic (#7954) 2021-07-13 12:39:03 -07:00
tacacs [tacacs]: do not modify local user if there is no priviledge 2021-02-06 12:28:52 -08:00
thrift Fix CVE-2017-1000487 security alert (#7173) 2021-03-31 22:45:06 -07:00
wpasupplicant [MACsec]: Set MACsec feature to be auto-start (#6678) 2021-02-23 13:22:45 -08:00