Skip to content

Commit

Permalink
fix 7260 headroom pool watermark test failure (#15536)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
observed consistent headroom wartermark test failure on 7260
and it's known issue of test script, as below RCA:

RCA:

summarize test step first:

PTF send lots of pkt to multiple src ports to fill multiple PG's share buffer
PTF send one or a few pkts to multiple src ports to trigger pfc on multiple PG
check watermark before test headroom's watermark
PTF send pkt to multiple src port to consum headroom pool, and test if watermark changes as expected
after step2,
already send 20 pkts into headroom to trigger PFC on 10 src ports (20 PG)
but, so far, "upper_bound" value is static hardcode "2 * margin + 1", didn't consider headroom pool consumption in step2.
since we use dynamically threshold calculating, it can get accurate threshold value, we pretty sure the headroom pool consumption equal "pgs_num" in step2.
so I change "upper_bound" value to "2 * margin + self.pgs_num", and it pass the tests.

How did you do it?
change "upper_bound" value to "2 * margin + self.pgs_num"

How did you verify/test it?
this change already verified in MSFT nightly for 202305 and 202311 branch, just commit to github.

Any platform specific information?
this change is dedicated to below platform and topology:

            if (hwsku == 'Arista-7260CX3-D108C8' and self.testbed_type in ('t0-116', 'dualtor-120')) \
                or (hwsku == 'Arista-7260CX3-C64' and self.testbed_type in ('dualtor-aa-56', 't1-64-lag')):
                upper_bound = 2 * margin + self.pgs_num
if other platform and topology have hit similar issue, can add affected platform and topo to above condition checking.
Note:
for generic fix, qos refactor project will covert.
  • Loading branch information
XuChen-MSFT authored and mssonicbld committed Nov 14, 2024
1 parent 1c6934e commit 94a0751
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,9 @@ def runTest(self):
sys.stderr.flush()

upper_bound = 2 * margin + 1
if (hwsku == 'Arista-7260CX3-D108C8' and self.testbed_type in ('t0-116', 'dualtor-120')) \
or (hwsku == 'Arista-7260CX3-C64' and self.testbed_type in ('dualtor-aa-56', 't1-64-lag')):
upper_bound = 2 * margin + self.pgs_num
if self.wm_multiplier:
hdrm_pool_wm = sai_thrift_read_headroom_pool_watermark(
self.src_client, self.buf_pool_roid)
Expand Down

0 comments on commit 94a0751

Please sign in to comment.