Skip to content

Commit

Permalink
qosConfig should account for portSpeedCableLength (sonic-net#8699)
Browse files Browse the repository at this point in the history
Fixed typo in initializing qosConfig when testing "wm_buf_pool_lossy". This will fix the KeyError: 'wm_buf_pool_lossy' problem.

Summary:
Fixes sonic-net#8698

Fix initialization of qosConfig when testing "wm_buf_pool_lossy" as for
some platforms, the parameters are indexed by portSpeedCableLength.
This will fix the KeyError: 'wm_buf_pool_lossy' problem.
  • Loading branch information
kenneth-arista authored Jul 26, 2023
1 parent 9f2e14f commit 25251f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,8 @@ def testQosSaiBufferPoolWatermark(
fillMin = qosConfig[bufPool]["pkts_num_fill_ingr_min"]
buf_pool_roid = ingressLosslessProfile["bufferPoolRoid"]
elif "wm_buf_pool_lossy" in bufPool:
qosConfig = dutQosConfig["param"]
baseQosConfig = dutQosConfig["param"]
qosConfig = baseQosConfig.get(portSpeedCableLength, baseQosConfig)
triggerDrop = qosConfig[bufPool]["pkts_num_trig_egr_drp"]
fillMin = qosConfig[bufPool]["pkts_num_fill_egr_min"]
buf_pool_roid = egressLossyProfile["bufferPoolRoid"]
Expand Down

0 comments on commit 25251f1

Please sign in to comment.