Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qos_params.th5.yaml #14250

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
199 changes: 199 additions & 0 deletions tests/qos/files/qos_params.th5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
qos_params:
th5:
topo-t0-standalone-256:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rick-arista , I believe we should use topo-t0-standalone-32 here, as it is consistent with our internal setup.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These params are generated for the 256 interface config. If you're testing with 32 interfaces I think they should still work, but you'll need to modify this ad hoc.

cell_size: 254
hdrm_pool_wm_multiplier: 1
200000_5m:
hdrm_pool_size:
dscps:
- 3
- 4
dst_port_id: 0
ecn: 1
margin: 2
pgs:
- 3
- 4
pgs_num: 50
pkts_num_hdrm_full: 1185
pkts_num_hdrm_partial: 47
pkts_num_trig_pfc: 120117
pkts_num_trig_pfc_multi:
- 120117
- 60096
- 30085
- 15079
- 7577
- 3825
- 1950
- 1012
- 543
- 308
- 191
- 133
- 103
- 89
- 81
- 78
- 76
- 75
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
- 74
src_port_ids:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
lossy_queue_1:
dscp: 8
ecn: 1
pg: 0
pkts_num_margin: 2
pkts_num_trig_egr_drp: 120051
pkts_num_egr_mem: 238
pkts_num_leak_out: 0
wm_pg_headroom:
cell_size: 254
dscp: 3
ecn: 1
pg: 3
pkts_num_margin: 2
pkts_num_trig_ingr_drp: 121302
pkts_num_trig_pfc: 120117
wm_pg_shared_lossless:
cell_size: 254
dscp: 3
ecn: 1
packet_size: 64
pg: 3
pkts_num_fill_min: 74
pkts_num_margin: 2
pkts_num_trig_pfc: 120117
wm_pg_shared_lossy:
cell_size: 254
dscp: 8
ecn: 1
packet_size: 64
pg: 0
pkts_num_fill_min: 7
pkts_num_margin: 2
pkts_num_trig_egr_drp: 120051
wm_q_shared_lossless:
cell_size: 254
dscp: 3
ecn: 1
pkts_num_fill_min: 0
pkts_num_margin: 2
pkts_num_trig_ingr_drp: 121302
queue: 3
wm_q_shared_lossy:
cell_size: 254
dscp: 8
ecn: 1
pkts_num_fill_min: 7
pkts_num_margin: 2
pkts_num_trig_egr_drp: 120051
queue: 0
xoff_1:
dscp: 3
ecn: 1
pg: 3
pkts_num_margin: 2
pkts_num_trig_ingr_drp: 121302
pkts_num_trig_pfc: 120117
Copy link

@li-pingmao li-pingmao Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rick-arista How do you get pkts_num_trig_pfc: 120117?

xoff_2:
dscp: 4
ecn: 1
pg: 4
pkts_num_margin: 2
pkts_num_trig_ingr_drp: 121302
pkts_num_trig_pfc: 120117
xon_1:
dscp: 3
ecn: 1
pg: 3
pkts_num_dismiss_pfc: 14
pkts_num_margin: 2
pkts_num_trig_pfc: 120117
xon_2:
dscp: 4
ecn: 1
pg: 4
pkts_num_dismiss_pfc: 14
pkts_num_margin: 2
pkts_num_trig_pfc: 120117
wrr:
ecn: 1
q0_num_of_pkts: 140
q1_num_of_pkts: 140
q2_num_of_pkts: 140
q3_num_of_pkts: 150
q4_num_of_pkts: 150
q5_num_of_pkts: 140
q6_num_of_pkts: 140
q7_num_of_pkts: 140
limit: 80
wrr_chg:
ecn: 1
q0_num_of_pkts: 80
q1_num_of_pkts: 80
q2_num_of_pkts: 80
q3_num_of_pkts: 300
q4_num_of_pkts: 300
q5_num_of_pkts: 80
q6_num_of_pkts: 80
q7_num_of_pkts: 80
limit: 80
lossy_weight: 8
lossless_weight: 30
3 changes: 3 additions & 0 deletions tests/qos/qos_sai_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,9 @@ def dutQosConfig(
if 'platform_asic' in duthost.facts and duthost.facts['platform_asic'] == 'broadcom-dnx':
logger.info("THDI_BUFFER_CELL_LIMIT_SP is not valid for broadcom DNX - ignore dynamic buffer config")
qosParams = qosConfigs['qos_params'][dutAsic][dutTopo]
elif dutAsic == 'th5':
logger.info("Generator script not implemented for TH5")
qosParams = qosConfigs['qos_params'][dutAsic][dutTopo]
else:
bufferConfig = self.dutBufferConfig(duthost, dut_asic)
pytest_assert(len(bufferConfig) == 4,
Expand Down
25 changes: 16 additions & 9 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ def runTest(self):
pkts_num_leak_out = 0

# send packets short of triggering pfc
if hwsku == 'DellEMC-Z9332f-M-O16C64' or hwsku == 'DellEMC-Z9332f-O32':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
# send packets short of triggering pfc
send_packet(self, src_port_id, pkt, (pkts_num_egr_mem +
pkts_num_leak_out +
Expand Down Expand Up @@ -2561,7 +2561,7 @@ def runTest(self):
if check_leackout_compensation_support(asic_type, hwsku):
pkts_num_leak_out = 0

if hwsku == 'DellEMC-Z9332f-M-O16C64' or hwsku == 'DellEMC-Z9332f-O32':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
send_packet(
self, src_port_id, pkt,
(pkts_num_egr_mem + pkts_num_leak_out + pkts_num_trig_pfc -
Expand Down Expand Up @@ -2603,7 +2603,7 @@ def runTest(self):
xmit_2_counters_base, _ = sai_thrift_read_port_counters(
self.dst_client, asic_type, port_list['dst'][dst_port_2_id]
)
if hwsku == 'DellEMC-Z9332f-M-O16C64' or hwsku == 'DellEMC-Z9332f-O32':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
send_packet(
self, src_port_id, pkt2,
(pkts_num_egr_mem + pkts_num_leak_out + pkts_num_dismiss_pfc +
Expand Down Expand Up @@ -2652,7 +2652,7 @@ def runTest(self):
log_message('step {}: {}\n'.format(step_id, step_desc), to_stderr=True)
xmit_3_counters_base, _ = sai_thrift_read_port_counters(
self.dst_client, asic_type, port_list['dst'][dst_port_3_id])
if hwsku == 'DellEMC-Z9332f-M-O16C64' or hwsku == 'DellEMC-Z9332f-O32':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
send_packet(self, src_port_id, pkt3,
pkts_num_egr_mem + pkts_num_leak_out + 1)
elif 'cisco-8000' in asic_type:
Expand Down Expand Up @@ -3030,7 +3030,7 @@ def runTest(self):
ip_ttl=64)

hwsku = self.test_params['hwsku']
if (hwsku == 'DellEMC-Z9332f-M-O16C64' or hwsku == 'DellEMC-Z9332f-O32'):
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
send_packet(
self, self.src_port_ids[sidx], pkt, pkts_num_egr_mem + self.pkts_num_leak_out)
else:
Expand Down Expand Up @@ -3972,7 +3972,7 @@ def runTest(self):
pkts_num_leak_out = 0

# send packets short of triggering egress drop
if hwsku == 'DellEMC-Z9332f-O32' or hwsku == 'DellEMC-Z9332f-M-O16C64':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
# send packets short of triggering egress drop
send_packet(self, src_port_id, pkt, pkts_num_egr_mem +
pkts_num_leak_out + pkts_num_trig_egr_drp - 1 - margin)
Expand Down Expand Up @@ -4437,6 +4437,9 @@ def runTest(self):
pg_min_pkts_num = pkts_num_egr_mem + \
pkts_num_leak_out + pkts_num_fill_min + margin
send_packet(self, src_port_id, pkt, pg_min_pkts_num)
elif hwsku == 'Arista-7060X6-64PE-256x200G':
pg_min_pkts_num = pkts_num_egr_mem + pkts_num_fill_min
send_packet(self, src_port_id, pkt, pg_min_pkts_num)
elif 'cisco-8000' in asic_type:
fill_leakout_plus_one(
self, src_port_id, dst_port_id, pkt, pg, asic_type, pkts_num_egr_mem)
Expand Down Expand Up @@ -4472,6 +4475,8 @@ def runTest(self):
if platform_asic and platform_asic == "broadcom-dnx":
assert (pg_shared_wm_res[pg] <=
((pkts_num_leak_out + pkts_num_fill_min) * (packet_length + internal_hdr_size)))
elif hwsku == 'Arista-7060X6-64PE-256x200G':
assert (pg_shared_wm_res[pg] <= margin * cell_size)
else:
assert (pg_shared_wm_res[pg] == 0)
else:
Expand Down Expand Up @@ -4673,7 +4678,7 @@ def runTest(self):
pkts_num_leak_out = 0

# send packets to trigger pfc but not trek into headroom
if hwsku == 'DellEMC-Z9332f-O32' or hwsku == 'DellEMC-Z9332f-M-O16C64':
if hwsku in ('DellEMC-Z9332f-M-O16C64', 'DellEMC-Z9332f-O32', 'Arista-7060X6-64PE-256x200G'):
send_packet(self, src_port_id, pkt, (pkts_num_egr_mem +
pkts_num_leak_out + pkts_num_trig_pfc) // cell_occupancy - margin)
else:
Expand Down Expand Up @@ -5048,7 +5053,7 @@ def runTest(self):
# so if queue min is zero, it will directly trek into shared pool by 1
# TH2 uses scheduler-based TX enable, this does not require sending packets
# to leak out
if hwsku == 'DellEMC-Z9332f-O32' or hwsku == 'DellEMC-Z9332f-M-O16C64':
if hwsku in ('DellEMC-Z9332f-O32', 'DellEMC-Z9332f-M-O16C64', 'Arista-7060X6-64PE-256x200G'):
que_min_pkts_num = pkts_num_egr_mem + pkts_num_leak_out + pkts_num_fill_min
send_packet(self, src_port_id, pkt, que_min_pkts_num)
else:
Expand Down Expand Up @@ -5080,7 +5085,9 @@ def runTest(self):
None, pg_cntrs, None, None, None,
None, None, pg_shared_wm_res, pg_headroom_wm_res, q_wm_res)

if pkts_num_fill_min:
if hwsku == 'Arista-7060X6-64PE-256x200G':
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
elif pkts_num_fill_min:
assert (q_wm_res[queue] == 0)
elif 'cisco-8000' in asic_type or "SN5600" in hwsku:
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
Expand Down
Loading