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

[vs]: Force10-S6000 buffer settings for virtual switch #2515

Merged
merged 1 commit into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion files/build_templates/buffers_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def
{
"CABLE_LENGTH": {
"AZURE": {
{% for port in PORT %}
{% for port in PORT_ALL %}
yxieca marked this conversation as resolved.
Show resolved Hide resolved
{%- set cable = cable_length(port) %}
"{{ port }}": "{{ cable }}"{%- if not loop.last %},{% endif %}

Expand Down
1 change: 1 addition & 0 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
6 changes: 5 additions & 1 deletion rules/scripts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)