Updated traffic scheduler settings for HWSKUs : DellEMC-Z9332f-O32 and DellEMC-Z9332f-M-O16C64 (#9828)

This commit is contained in:
vmittal-msft 2022-02-23 17:22:41 -08:00 committed by GitHub
parent 937ffbdb05
commit bc1dfea619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4272 additions and 0 deletions

View File

@ -30,6 +30,7 @@
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
{%- set apollo_resource_types = ['DL-NPU-Apollo'] -%}
{
@ -156,6 +157,22 @@
}
},
{% 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.0": {
"type" : "DWRR",
@ -166,6 +183,7 @@
"weight": "15"
}
},
{% endif %}
{% if asic_type in pfc_to_pg_map_supported_asics %}
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
@ -221,12 +239,21 @@
"wred_profile": "AZURE_LOSSLESS"
},
{% 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 %}
"{{ port }}|4": {
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% endif %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
"scheduler": "scheduler.0"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@ class TestJ2Files(TestCase):
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_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.output_file = os.path.join(self.test_dir, 'output')
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')
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):
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')