diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2 new file mode 100644 index 0000000000..38e34eb571 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2 @@ -0,0 +1,45 @@ +{%- set default_cable = '300m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {% for port_idx in range(0,32) %} + {% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %} + {% endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "12766208", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "12766208", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "7326924", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"12766208" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini index 776f31805c..aebbc97434 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini @@ -1,11 +1,17 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset + 10000 5m 55120 18432 56368 -3 2496 + 25000 5m 55120 18432 56368 -3 2496 40000 5m 55120 18432 56368 -3 2496 50000 5m 55120 18432 56368 -3 2496 100000 5m 55120 18432 56368 -3 2496 + 10000 40m 55120 18432 56368 -3 2496 + 25000 40m 55120 18432 56368 -3 2496 40000 40m 55120 18432 56368 -3 2496 50000 40m 55120 18432 56368 -3 2496 100000 40m 55120 18432 56368 -3 2496 + 10000 300m 55120 18432 56368 -3 2496 + 25000 300m 55120 18432 56368 -3 2496 40000 300m 55120 18432 56368 -3 2496 50000 300m 55120 18432 56368 -3 2496 100000 300m 55120 18432 56368 -3 2496 diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index 9a26a8b149..16b7263ecd 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -107,7 +107,7 @@ def { "CABLE_LENGTH": { "AZURE": { - {% for port in PORT %} + {% for port in PORT_ALL %} {%- set cable = cable_length(port) %} "{{ port }}": "{{ cable }}"{%- if not loop.last %},{% endif %} diff --git a/platform/vs/docker-sonic-vs.mk b/platform/vs/docker-sonic-vs.mk index e368019832..2baa1e6beb 100644 --- a/platform/vs/docker-sonic-vs.mk +++ b/platform/vs/docker-sonic-vs.mk @@ -32,6 +32,7 @@ endif $(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \ $(ARP_UPDATE_SCRIPT) \ $(BUFFERS_CONFIG_TEMPLATE) \ + $(QOS_CONFIG_TEMPLATE) \ $(SONIC_VERSION) $(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index 6f2192d61c..0d2daf93fc 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -87,7 +87,7 @@ COPY ["start.sh", "orchagent.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"] COPY ["files/arp_update", "/usr/bin/"] -COPY ["files/buffers_config.j2", "/usr/share/sonic/templates/"] +COPY ["files/buffers_config.j2", "files/qos_config.j2", "/usr/share/sonic/templates/"] COPY ["files/sonic_version.yml", "/etc/sonic/"] # Workaround the tcpdump issue diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 1b34be2cd7..043753aa29 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -18,8 +18,9 @@ if [ -f /etc/sonic/config_db.json ]; then else # generate and merge buffers configuration into config file sonic-cfggen -t /usr/share/sonic/hwsku/buffers.json.j2 > /tmp/buffers.json + sonic-cfggen -t /usr/share/sonic/hwsku/qos.json.j2 > /tmp/qos.json sonic-cfggen -p /usr/share/sonic/hwsku/port_config.ini -k $HWSKU --print-data > /tmp/ports.json - sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json + sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/qos.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json fi mkdir -p /etc/swss/config.d/ diff --git a/rules/scripts.mk b/rules/scripts.mk index d042f7e3b2..6010b10b83 100644 --- a/rules/scripts.mk +++ b/rules/scripts.mk @@ -8,8 +8,12 @@ $(CONFIGDB_LOAD_SCRIPT)_PATH = files/scripts BUFFERS_CONFIG_TEMPLATE = buffers_config.j2 $(BUFFERS_CONFIG_TEMPLATE)_PATH = files/build_templates +QOS_CONFIG_TEMPLATE = qos_config.j2 +$(QOS_CONFIG_TEMPLATE)_PATH = files/build_templates + SONIC_COPY_FILES += $(CONFIGDB_LOAD_SCRIPT) \ $(ARP_UPDATE_SCRIPT) \ - $(BUFFERS_CONFIG_TEMPLATE) + $(BUFFERS_CONFIG_TEMPLATE) \ + $(QOS_CONFIG_TEMPLATE)