From 26d73eda178a903c45cffba9aede02b011fc50da Mon Sep 17 00:00:00 2001 From: Zhi Yuan Carl Zhao Date: Mon, 22 Apr 2019 13:59:30 -0700 Subject: [PATCH] [Arista] Add QoS needed files for Arista 7170 --- .../Arista-7170-64C/buffers.json.j2 | 3 + .../Arista-7170-64C/buffers_defaults_t0.j2 | 46 +++++++++++++++ .../Arista-7170-64C/qos.json.j2 | 1 + .../Arista-7170-64C/switch-sai.conf | 3 +- .../Arista-7170-Q59S20/buffers.json.j2 | 3 + .../Arista-7170-Q59S20/buffers_defaults_t0.j2 | 58 +++++++++++++++++++ .../Arista-7170-Q59S20/qos.json.j2 | 1 + .../Arista-7170-Q59S20/switch-sai.conf | 3 +- 8 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers.json.j2 create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-64C/qos.json.j2 create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers.json.j2 create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2 create mode 100644 device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/qos.json.j2 diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers.json.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers.json.j2 new file mode 100644 index 000000000000..e6e9e844469b --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers.json.j2 @@ -0,0 +1,3 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} + diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 new file mode 100644 index 000000000000..62a6bac1c25f --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 @@ -0,0 +1,46 @@ +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,64) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "33329088", + "type": "ingress", + "mode": "dynamic", + "xoff": "7827456" + }, + "egress_lossy_pool": { + "size": "26663272", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "42349632", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "static_th":"11075584" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"10587408" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1664", + "dynamic_th":"-1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/qos.json.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/qos.json.j2 new file mode 100644 index 000000000000..3e548325ea30 --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/qos.json.j2 @@ -0,0 +1 @@ +{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/switch-sai.conf b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/switch-sai.conf index f64f5f88ec1b..c3abb3ebd8fc 100644 --- a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/switch-sai.conf +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/switch-sai.conf @@ -26,7 +26,8 @@ "tofino-bin": "share/tofinopd/switch/tofino.bin", "switchapi": "lib/libswitchapi.so", "switchsai": "lib/libswitchsai.so", - "switchapi_port_add": false + "switchapi_port_add": false, + "non_default_port_ppgs": 5 } ] } diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers.json.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers.json.j2 new file mode 100644 index 000000000000..e6e9e844469b --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers.json.j2 @@ -0,0 +1,3 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} + diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2 new file mode 100644 index 000000000000..8ca15c1b0391 --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2 @@ -0,0 +1,58 @@ +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,20) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(80,88) %} + {%- if PORT_ALL.append("Ethernet%d" % port_idx) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(22,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(128,140) %} + {%- if PORT_ALL.append("Ethernet%d" % port_idx) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(35,64) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "33329088", + "type": "ingress", + "mode": "dynamic", + "xoff": "7827456" + }, + "egress_lossy_pool": { + "size": "26663272", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "42349632", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "static_th":"11075584" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"10587408" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1664", + "dynamic_th":"-1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/qos.json.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/qos.json.j2 new file mode 100644 index 000000000000..3e548325ea30 --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/qos.json.j2 @@ -0,0 +1 @@ +{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/switch-sai.conf b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/switch-sai.conf index f64f5f88ec1b..c3abb3ebd8fc 100644 --- a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/switch-sai.conf +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/switch-sai.conf @@ -26,7 +26,8 @@ "tofino-bin": "share/tofinopd/switch/tofino.bin", "switchapi": "lib/libswitchapi.so", "switchsai": "lib/libswitchsai.so", - "switchapi_port_add": false + "switchapi_port_add": false, + "non_default_port_ppgs": 5 } ] }