Skip to content

Commit 9c2d724

Browse files
authored
[vs]: Force10-S6000 buffer settings for virtual switch (#2515)
Signed-off-by: Guohan Lu <[email protected]>
1 parent fd02bee commit 9c2d724

File tree

7 files changed

+61
-4
lines changed

7 files changed

+61
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- macro generate_port_lists(PORT_ALL) %}
4+
{# Generate list of ports #}
5+
{% for port_idx in range(0,32) %}
6+
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
7+
{% endfor %}
8+
{%- endmacro %}
9+
10+
{%- macro generate_buffer_pool_and_profiles() %}
11+
"BUFFER_POOL": {
12+
"ingress_lossless_pool": {
13+
"size": "12766208",
14+
"type": "ingress",
15+
"mode": "dynamic"
16+
},
17+
"egress_lossless_pool": {
18+
"size": "12766208",
19+
"type": "egress",
20+
"mode": "static"
21+
},
22+
"egress_lossy_pool": {
23+
"size": "7326924",
24+
"type": "egress",
25+
"mode": "dynamic"
26+
}
27+
},
28+
"BUFFER_PROFILE": {
29+
"ingress_lossy_profile": {
30+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
31+
"size":"0",
32+
"dynamic_th":"3"
33+
},
34+
"egress_lossless_profile": {
35+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
36+
"size":"0",
37+
"static_th":"12766208"
38+
},
39+
"egress_lossy_profile": {
40+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
41+
"size":"1518",
42+
"dynamic_th":"3"
43+
}
44+
},
45+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# PG lossless profiles.
22
# speed cable size xon xoff threshold xon_offset
3+
10000 5m 55120 18432 56368 -3 2496
4+
25000 5m 55120 18432 56368 -3 2496
35
40000 5m 55120 18432 56368 -3 2496
46
50000 5m 55120 18432 56368 -3 2496
57
100000 5m 55120 18432 56368 -3 2496
8+
10000 40m 55120 18432 56368 -3 2496
9+
25000 40m 55120 18432 56368 -3 2496
610
40000 40m 55120 18432 56368 -3 2496
711
50000 40m 55120 18432 56368 -3 2496
812
100000 40m 55120 18432 56368 -3 2496
13+
10000 300m 55120 18432 56368 -3 2496
14+
25000 300m 55120 18432 56368 -3 2496
915
40000 300m 55120 18432 56368 -3 2496
1016
50000 300m 55120 18432 56368 -3 2496
1117
100000 300m 55120 18432 56368 -3 2496

files/build_templates/buffers_config.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def
107107
{
108108
"CABLE_LENGTH": {
109109
"AZURE": {
110-
{% for port in PORT %}
110+
{% for port in PORT_ALL %}
111111
{%- set cable = cable_length(port) %}
112112
"{{ port }}": "{{ cable }}"{%- if not loop.last %},{% endif %}
113113

platform/vs/docker-sonic-vs.mk

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ endif
3232
$(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
3333
$(ARP_UPDATE_SCRIPT) \
3434
$(BUFFERS_CONFIG_TEMPLATE) \
35+
$(QOS_CONFIG_TEMPLATE) \
3536
$(SONIC_VERSION)
3637

3738
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)

platform/vs/docker-sonic-vs/Dockerfile.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ COPY ["start.sh", "orchagent.sh", "/usr/bin/"]
8787
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
8888
COPY ["files/configdb-load.sh", "/usr/bin/"]
8989
COPY ["files/arp_update", "/usr/bin/"]
90-
COPY ["files/buffers_config.j2", "/usr/share/sonic/templates/"]
90+
COPY ["files/buffers_config.j2", "files/qos_config.j2", "/usr/share/sonic/templates/"]
9191
COPY ["files/sonic_version.yml", "/etc/sonic/"]
9292

9393
# Workaround the tcpdump issue

platform/vs/docker-sonic-vs/start.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ if [ -f /etc/sonic/config_db.json ]; then
1818
else
1919
# generate and merge buffers configuration into config file
2020
sonic-cfggen -t /usr/share/sonic/hwsku/buffers.json.j2 > /tmp/buffers.json
21+
sonic-cfggen -t /usr/share/sonic/hwsku/qos.json.j2 > /tmp/qos.json
2122
sonic-cfggen -p /usr/share/sonic/hwsku/port_config.ini -k $HWSKU --print-data > /tmp/ports.json
22-
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json
23+
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
2324
fi
2425

2526
mkdir -p /etc/swss/config.d/

rules/scripts.mk

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ $(CONFIGDB_LOAD_SCRIPT)_PATH = files/scripts
88
BUFFERS_CONFIG_TEMPLATE = buffers_config.j2
99
$(BUFFERS_CONFIG_TEMPLATE)_PATH = files/build_templates
1010

11+
QOS_CONFIG_TEMPLATE = qos_config.j2
12+
$(QOS_CONFIG_TEMPLATE)_PATH = files/build_templates
13+
1114
SONIC_COPY_FILES += $(CONFIGDB_LOAD_SCRIPT) \
1215
$(ARP_UPDATE_SCRIPT) \
13-
$(BUFFERS_CONFIG_TEMPLATE)
16+
$(BUFFERS_CONFIG_TEMPLATE) \
17+
$(QOS_CONFIG_TEMPLATE)
1418

1519

0 commit comments

Comments
 (0)