Updated traffic scheduler settings for HWSKUs : DellEMC-Z9332f-O32 and DellEMC-Z9332f-M-O16C64 (#9828)
This commit is contained in:
parent
937ffbdb05
commit
bc1dfea619
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
||||||
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
|
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
|
||||||
|
{%- set apollo_resource_types = ['DL-NPU-Apollo'] -%}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -156,6 +157,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if 'resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] in apollo_resource_types %}
|
||||||
|
"SCHEDULER": {
|
||||||
|
"scheduler.0": {
|
||||||
|
"type" : "DWRR",
|
||||||
|
"weight": "1"
|
||||||
|
},
|
||||||
|
"scheduler.1": {
|
||||||
|
"type" : "DWRR",
|
||||||
|
"weight": "1"
|
||||||
|
},
|
||||||
|
"scheduler.2": {
|
||||||
|
"type" : "DWRR",
|
||||||
|
"weight": "100"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{% else %}
|
||||||
"SCHEDULER": {
|
"SCHEDULER": {
|
||||||
"scheduler.0": {
|
"scheduler.0": {
|
||||||
"type" : "DWRR",
|
"type" : "DWRR",
|
||||||
@ -166,6 +183,7 @@
|
|||||||
"weight": "15"
|
"weight": "15"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{% endif %}
|
||||||
{% if asic_type in pfc_to_pg_map_supported_asics %}
|
{% if asic_type in pfc_to_pg_map_supported_asics %}
|
||||||
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
|
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
|
||||||
"AZURE": {
|
"AZURE": {
|
||||||
@ -221,12 +239,21 @@
|
|||||||
"wred_profile": "AZURE_LOSSLESS"
|
"wred_profile": "AZURE_LOSSLESS"
|
||||||
},
|
},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if 'resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] in apollo_resource_types %}
|
||||||
|
{% for port in PORT_ACTIVE %}
|
||||||
|
"{{ port }}|4": {
|
||||||
|
"scheduler" : "scheduler.2",
|
||||||
|
"wred_profile": "AZURE_LOSSLESS"
|
||||||
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
{% for port in PORT_ACTIVE %}
|
{% for port in PORT_ACTIVE %}
|
||||||
"{{ port }}|4": {
|
"{{ port }}|4": {
|
||||||
"scheduler" : "scheduler.1",
|
"scheduler" : "scheduler.1",
|
||||||
"wred_profile": "AZURE_LOSSLESS"
|
"wred_profile": "AZURE_LOSSLESS"
|
||||||
},
|
},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% for port in PORT_ACTIVE %}
|
{% for port in PORT_ACTIVE %}
|
||||||
"{{ port }}|0": {
|
"{{ port }}|0": {
|
||||||
"scheduler": "scheduler.0"
|
"scheduler": "scheduler.0"
|
||||||
|
2023
src/sonic-config-engine/tests/sample-dell-9332-t1-minigraph.xml
Normal file
2023
src/sonic-config-engine/tests/sample-dell-9332-t1-minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
1101
src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json
Normal file
1101
src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json
Normal file
File diff suppressed because it is too large
Load Diff
1101
src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json
Normal file
1101
src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@ class TestJ2Files(TestCase):
|
|||||||
self.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml')
|
self.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml')
|
||||||
self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml')
|
self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml')
|
||||||
self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini')
|
self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini')
|
||||||
|
self.dell9332_t1_minigraph = os.path.join(self.test_dir, 'sample-dell-9332-t1-minigraph.xml')
|
||||||
self.radv_test_minigraph = os.path.join(self.test_dir, 'radv-test-sample-graph.xml')
|
self.radv_test_minigraph = os.path.join(self.test_dir, 'radv-test-sample-graph.xml')
|
||||||
self.output_file = os.path.join(self.test_dir, 'output')
|
self.output_file = os.path.join(self.test_dir, 'output')
|
||||||
os.environ["CFGGEN_UNIT_TESTING"] = "2"
|
os.environ["CFGGEN_UNIT_TESTING"] = "2"
|
||||||
@ -211,6 +212,25 @@ class TestJ2Files(TestCase):
|
|||||||
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-arista7050.json')
|
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-arista7050.json')
|
||||||
assert filecmp.cmp(sample_output_file, self.output_file)
|
assert filecmp.cmp(sample_output_file, self.output_file)
|
||||||
|
|
||||||
|
def test_qos_dell9332_render_template(self):
|
||||||
|
dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dellemc_z9332f_d1508-r0', 'DellEMC-Z9332f-O32')
|
||||||
|
qos_file = os.path.join(dell_dir_path, 'qos.json.j2')
|
||||||
|
port_config_ini_file = os.path.join(dell_dir_path, 'port_config.ini')
|
||||||
|
|
||||||
|
# copy qos_config.j2 to the Dell Z9332 directory to have all templates in one directory
|
||||||
|
qos_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'qos_config.j2')
|
||||||
|
shutil.copy2(qos_config_file, dell_dir_path)
|
||||||
|
|
||||||
|
argument = '-m ' + self.dell9332_t1_minigraph + ' -p ' + port_config_ini_file + ' -t ' + qos_file + ' > ' + self.output_file
|
||||||
|
self.run_script(argument)
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
qos_config_file_new = os.path.join(dell_dir_path, 'qos_config.j2')
|
||||||
|
os.remove(qos_config_file_new)
|
||||||
|
|
||||||
|
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-dell9332.json')
|
||||||
|
assert filecmp.cmp(sample_output_file, self.output_file)
|
||||||
|
|
||||||
def test_qos_dell6100_render_template(self):
|
def test_qos_dell6100_render_template(self):
|
||||||
dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100')
|
dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100')
|
||||||
qos_file = os.path.join(dell_dir_path, 'qos.json.j2')
|
qos_file = os.path.join(dell_dir_path, 'qos.json.j2')
|
||||||
|
Loading…
Reference in New Issue
Block a user