diff --git a/tests/qos/files/qos_params.gb.yaml b/tests/qos/files/qos_params.gb.yaml index 60c3a0085e..d720f31777 100644 --- a/tests/qos/files/qos_params.gb.yaml +++ b/tests/qos/files/qos_params.gb.yaml @@ -385,6 +385,7 @@ qos_params: 100000_300m: pkts_num_leak_out: 0 pkts_num_egr_mem: 6884 + pkts_num_egr_mem_short_long: 3588 pg_drop: dscp: 3 ecn: 1 @@ -509,6 +510,7 @@ qos_params: 400000_300m: pkts_num_leak_out: 0 pkts_num_egr_mem: 6884 + pkts_num_egr_mem_short_long: 3588 pg_drop: dscp: 3 ecn: 1 diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index 9e7c0e5df8..b0ccf8336f 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -616,6 +616,8 @@ def select_src_dst_dut_and_asic(self, duthosts, request, tbinfo, lower_tor_host) dst_dut_index = 0 src_asic_index = 0 dst_asic_index = 0 + src_long_link = False + dst_long_link = False topo = tbinfo["topo"]["name"] if 'dualtor' in tbinfo['topo']['name']: # index of lower_tor_host @@ -695,9 +697,11 @@ def select_src_dst_dut_and_asic(self, duthosts, request, tbinfo, lower_tor_host) if test_port_selection_criteria == 'multi_dut_longlink_to_shortlink': src_dut_index = is_longlink_list.index(True) dst_dut_index = is_longlink_list.index(False) + src_long_link = True else: src_dut_index = is_longlink_list.index(False) dst_dut_index = is_longlink_list.index(True) + dst_long_link = True src_asic_index = 0 dst_asic_index = 0 @@ -706,7 +710,9 @@ def select_src_dst_dut_and_asic(self, duthosts, request, tbinfo, lower_tor_host) "src_dut_index": src_dut_index, "dst_dut_index": dst_dut_index, "src_asic_index": src_asic_index, - "dst_asic_index": dst_asic_index + "dst_asic_index": dst_asic_index, + "src_long_link": src_long_link, + "dst_long_link": dst_long_link } @pytest.fixture(scope='class') diff --git a/tests/qos/test_qos_sai.py b/tests/qos/test_qos_sai.py index 98e028137f..52ca8e5f98 100644 --- a/tests/qos/test_qos_sai.py +++ b/tests/qos/test_qos_sai.py @@ -407,6 +407,14 @@ def testQosSaiPfcXoffLimit( if "pkts_num_egr_mem" in list(qosConfig.keys()): testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem"] + if dutTestParams["basicParams"].get("platform_asic", None) == "cisco-8000" \ + and not get_src_dst_asic_and_duts["src_long_link"] and get_src_dst_asic_and_duts["dst_long_link"]: + if "pkts_num_egr_mem_short_long" in list(qosConfig.keys()): + testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem_short_long"] + else: + pytest.skip( + "pkts_num_egr_mem_short_long is missing in yaml file ") + if "pkts_num_margin" in list(qosConfig[xoffProfile].keys()): testParams["pkts_num_margin"] = qosConfig[xoffProfile]["pkts_num_margin"] @@ -686,6 +694,14 @@ def testQosSaiPfcXonLimit( if "pkts_num_egr_mem" in list(qosConfig.keys()): testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem"] + if dutTestParams["basicParams"].get("platform_asic", None) == "cisco-8000" \ + and not get_src_dst_asic_and_duts["src_long_link"] and get_src_dst_asic_and_duts["dst_long_link"]: + if "pkts_num_egr_mem_short_long" in list(qosConfig.keys()): + testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem_short_long"] + else: + pytest.skip( + "pkts_num_egr_mem_short_long is missing in yaml file ") + if "pkts_num_hysteresis" in list(qosConfig[xonProfile].keys()): testParams["pkts_num_hysteresis"] = qosConfig[xonProfile]["pkts_num_hysteresis"] @@ -1698,6 +1714,14 @@ def testQosSaiPgSharedWatermark( if "pkts_num_egr_mem" in list(qosConfig.keys()): testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem"] + if dutTestParams["basicParams"].get("platform_asic", None) == "cisco-8000" \ + and not get_src_dst_asic_and_duts["src_long_link"] and get_src_dst_asic_and_duts["dst_long_link"]: + if "pkts_num_egr_mem_short_long" in list(qosConfig.keys()): + testParams["pkts_num_egr_mem"] = qosConfig["pkts_num_egr_mem_short_long"] + else: + pytest.skip( + "PGSharedWatermark: pkts_num_egr_mem_short_long is missing in yaml file ") + if "packet_size" in list(qosConfig[pgProfile].keys()): testParams["packet_size"] = qosConfig[pgProfile]["packet_size"]