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
8 changes: 4 additions & 4 deletions tests/qos/files/mellanox/qos_param_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,20 @@ def calculate_parameters(self):
xon = {}
xon['pkts_num_trig_pfc'] = pkts_num_trig_pfc
xon['pkts_num_dismiss_pfc'] = pkts_num_dismiss_pfc
xon['pkts_num_hysteresis'] = pkts_num_hysteresis
xon['pkts_num_hysteresis'] = pkts_num_hysteresis + 16
if self.asic_type == 'spc2':
xon['pkts_num_margin'] = 2
elif self.asic_type == 'spc3':
xon['pkts_num_margin'] = 0
xon['pkts_num_margin'] = 3
self.qos_params_mlnx['xon_1'].update(xon)
self.qos_params_mlnx['xon_2'].update(xon)

wm_pg_headroom = self.qos_params_mlnx[self.speed_cable_len]['wm_pg_headroom']
wm_pg_headroom['pkts_num_trig_pfc'] = pkts_num_trig_pfc
wm_pg_headroom['pkts_num_trig_ingr_drp'] = pkts_num_trig_ingr_drp
wm_pg_headroom['cell_size'] = self.cell_size
if self.asic_type == 'spc1':
wm_pg_headroom['pkts_num_margin'] = 1
if self.asic_type == 'spc3':
wm_pg_headroom['pkts_num_margin'] = 3
else:
wm_pg_headroom['pkts_num_margin'] = 2

Expand Down
4 changes: 3 additions & 1 deletion tests/saitests/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,11 +1578,13 @@ def runTest(self):
# send packets
try:
# send packets to trigger pfc but not trek into headroom
send_packet(self, src_port_id, pkt, pkts_num_leak_out + pkts_num_trig_pfc)
send_packet(self, src_port_id, pkt, pkts_num_leak_out + pkts_num_trig_pfc - margin)
time.sleep(8)
q_wm_res, pg_shared_wm_res, pg_headroom_wm_res = sai_thrift_read_port_watermarks(self.client, port_list[src_port_id])
assert(pg_headroom_wm_res[pg] == 0)

send_packet(self, src_port_id, pkt, margin)

# send packet batch of fixed packet numbers to fill pg headroom
# first round sends only 1 packet
expected_wm = 0
Expand Down