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

This commit is contained in:
vmittal-msft 2022-02-15 16:15:20 -08:00 committed by GitHub
parent 6293a091a8
commit 304ec5b0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4272 additions and 1 deletions

View File

@ -30,7 +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'] -%}
{
{% if generate_tc_to_pg_map is defined %}
@ -156,6 +156,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 +182,7 @@
"weight": "15"
}
},
{% endif %}
{% if asic_type in pfc_to_pg_map_supported_asics %}
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
@ -221,12 +238,21 @@
"wred_profile": "[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|scheduler.2]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
{% endfor %}
{% else %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
"scheduler" : "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
{% endfor %}
{% endif %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
"scheduler": "[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

@ -27,6 +27,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.output_file = os.path.join(self.test_dir, 'output')
def run_script(self, argument):
@ -219,6 +220,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')