Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,6 @@ qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolSize:
and asic_type in ['cisco-8000']"
- "topo_type in ['m0', 'mx']"
- "topo_name not in ['t0', 't0-64', 't0-116', 't0-118', 't0-35', 't0-56', 't0-standalone-32', 't0-standalone-64', 't0-standalone-128', 't0-standalone-256', 'dualtor-56', 'dualtor-120', 'dualtor', 't0-80', 't0-backend', 't1-lag', 't1-64-lag', 't1-56-lag', 't1-backend', 't2', 't2_2lc_36p-masic', 't2_2lc_min_ports-masic'] and asic_type not in ['mellanox']"
- "'t2' in topo_name and asic_subtype in ['broadcom-dnx']"
- "asic_type in ['vs']"

qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolWatermark:
Expand Down
8 changes: 4 additions & 4 deletions tests/qos/files/qos_params.j2c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,10 @@ qos_params:
src_port_ids: [ 0, 2, 4, 6, 8, 10, 12, 14, 16 ]
dst_port_id: 18
pgs_num: 18
pkts_num_trig_pfc: 657523
pkts_num_hdrm_full: 622850
pkts_num_hdrm_partial: 622750
margin: 300
pkts_num_trig_pfc: 542448
pkts_num_hdrm_full: 713397
pkts_num_hdrm_partial: 713300
margin: 100
wm_pg_headroom:
dscp: 3
ecn: 1
Expand Down
41 changes: 28 additions & 13 deletions tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,7 @@ def testQosSaiLosslessVoq(

def testQosSaiHeadroomPoolSize(
self, get_src_dst_asic_and_duts, ptfhost, dutTestParams, dutConfig, dutQosConfig,
ingressLosslessProfile
):
ingressLosslessProfile, change_lag_lacp_timer):
# NOTE: cisco-8800 will skip this test since there are no headroom pool
"""
Test QoS SAI Headroom pool size
Expand Down Expand Up @@ -881,19 +880,28 @@ def testQosSaiHeadroomPoolSize(

if ('platform_asic' in dutTestParams["basicParams"] and
dutTestParams["basicParams"]["platform_asic"] == "broadcom-dnx"):
# for 100G port speed the number of ports required to fill headroom is huge,
# hence skipping the test with speed 100G or cable length of 2k
if portSpeedCableLength not in ['400000_120000m']:
pytest.skip("Insufficient number of ports to fill the headroom")
# Need to adjust hdrm_pool_size src_port_ids, dst_port_id and pgs_num based on how many source and dst ports
# present
src_ports = dutConfig['testPortIds'][src_dut_index][src_asic_index]
if len(src_ports) < 5:
pytest.skip("Insufficient number of src ports for testQosSaiHeadroomPoolSize")
qosConfig["hdrm_pool_size"]["src_port_ids"] = src_ports[1:5]
qosConfig["hdrm_pool_size"]["pgs_num"] = 2 * len(qosConfig["hdrm_pool_size"]["src_port_ids"])

if get_src_dst_asic_and_duts['src_asic'] == get_src_dst_asic_and_duts['dst_asic']:
# Src and dst are the same asics, leave one for dst port and the rest for src ports
qosConfig["hdrm_pool_size"]["src_port_ids"] = src_ports[:-1]
qosConfig["hdrm_pool_size"]["dst_port_id"] = src_ports[-1]
qosConfig["hdrm_pool_size"]["pgs_num"] = 2 * len(qosConfig["hdrm_pool_size"]["src_port_ids"])
qosConfig["hdrm_pool_size"]["dst_port_id"] = src_ports[0]

else:
qosConfig["hdrm_pool_size"]["src_port_ids"] = src_ports
qosConfig["hdrm_pool_size"]["dst_port_id"] = dutConfig['testPortIds'][dst_dut_index][dst_asic_index][-1]
qosConfig["hdrm_pool_size"]["pgs_num"] = 2 * len(qosConfig["hdrm_pool_size"]["src_port_ids"])
qosConfig["hdrm_pool_size"]["dst_port_id"] = dutConfig['testPortIds'][dst_dut_index][dst_asic_index][0]

src_port_vlans = [testPortIps[src_dut_index][src_asic_index][port]['vlan_id']
if 'vlan_id' in testPortIps[src_dut_index][src_asic_index][port]
else None for port in qosConfig["hdrm_pool_size"]["src_port_ids"]]
self.updateTestPortIdIp(dutConfig, get_src_dst_asic_and_duts, qosConfig["hdrm_pool_size"])

testParams = dict()
Expand All @@ -914,7 +922,8 @@ def testQosSaiHeadroomPoolSize(
"pkts_num_leak_out": qosConfig["pkts_num_leak_out"],
"pkts_num_hdrm_full": qosConfig["hdrm_pool_size"]["pkts_num_hdrm_full"],
"pkts_num_hdrm_partial": qosConfig["hdrm_pool_size"]["pkts_num_hdrm_partial"],
"hwsku": dutTestParams['hwsku']
"hwsku": dutTestParams['hwsku'],
"src_port_vlan": dutConfig["testPorts"]["src_port_vlan"]
})

if "platform_asic" in dutTestParams["basicParams"]:
Expand Down Expand Up @@ -942,10 +951,16 @@ def testQosSaiHeadroomPoolSize(
if "pkts_num_trig_pfc_multi" in qosConfig["hdrm_pool_size"]:
testParams.update({"pkts_num_trig_pfc_multi": qosConfig["hdrm_pool_size"]["pkts_num_trig_pfc_multi"]})

self.runPtfTest(
ptfhost, testCase="sai_qos_tests.HdrmPoolSizeTest",
testParams=testParams
)
if ('platform_asic' in dutTestParams["basicParams"] and
dutTestParams["basicParams"]["platform_asic"] == "broadcom-dnx"):
testParams['src_port_vlan'] = src_port_vlans
self.runPtfTest(
ptfhost, testCase="sai_qos_tests.HdrmPoolSizeTest_withDynamicBufferCacl",
testParams=testParams)
else:
self.runPtfTest(
ptfhost, testCase="sai_qos_tests.HdrmPoolSizeTest",
testParams=testParams)

@pytest.mark.parametrize("sharedResSizeKey", ["shared_res_size_1", "shared_res_size_2"])
def testQosSaiSharedReservationSize(
Expand Down
Loading