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

[action] [PR:14942] Cisco-8122 fixes for T1 topology #15085

Merged
merged 1 commit into from
Oct 22, 2024
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
7 changes: 5 additions & 2 deletions tests/qos/files/cisco/qos_param_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ def __define_pfc_xoff_limit(self):
"pkts_num_trig_pfc": self.pause_thr // self.buffer_size // packet_buffs,
"pkts_num_trig_ingr_drp": self.lossless_drop_thr // self.buffer_size // packet_buffs,
"packet_size": packet_size}
if dscp_pg == 4:
# Some control traffic maps to DSCP 4, increase margin.
params["pkts_num_margin"] = 8
self.write_params("xoff_{}".format(param_i), params)

def __define_pfc_xon_limit(self):
Expand Down Expand Up @@ -576,8 +579,8 @@ def __define_q_watermark_all_ports(self):
lossy_lossless_action_thr = min(self.lossy_drop_bytes, self.pause_thr)
pkts_num_leak_out = 0
if self.dutAsic == "gr2":
# Send a burst of leakout packets to optimize runtime. Expected leakout is around 1250
pkts_num_leak_out = 1150
# Send a burst of leakout packets to optimize runtime. Expected leakout is around 950
pkts_num_leak_out = 800
self.log("In __define_q_watermark_all_ports, using min lossy-drop/lossless-pause threshold of {}".format(
lossy_lossless_action_thr))
params = {"ecn": 1,
Expand Down
13 changes: 7 additions & 6 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ def runTest(self):
self.src_client, port_list['src'][src_port_id])

# send pkts with dscps that map to the same pg
print("Testing DSCPs mapping to PG {}".format(pg), file=sys.stderr)
for dscp in dscps:
tos = (dscp << 2)
tos |= 1
Expand Down Expand Up @@ -1191,7 +1192,7 @@ def runTest(self):
# pg = 0 => Some extra packets with unmarked TC
# pg = 4 => Extra packets for LACP/BGP packets
# pg = 7 => packets from cpu to front panel ports
if platform_asic and platform_asic == "broadcom-dnx":
if platform_asic and platform_asic in ["broadcom-dnx", "cisco-8000"]:
if i == pg:
if i == 3:
assert (pg_cntrs[pg] == pg_cntrs_base[pg] + len(dscps))
Expand Down Expand Up @@ -5714,14 +5715,14 @@ def runTest(self):

try:
for i in range(len(prio_list)):
log_message("DSCP index {}/{}".format(i + 1, len(prio_list)))
log_message("DSCP index {}/{}".format(i + 1, len(prio_list)), to_stderr=True)
queue = queue_list[i]
for p_cnt in range(len(dst_port_ids)):
dst_port = dst_port_ids[p_cnt]
self.sai_thrift_port_tx_disable(self.dst_client, asic_type, [dst_port])

# leakout
log_message("Sending {} leakout packets".format(pkts_num_leak_out))
log_message("Sending {} leakout packets".format(pkts_num_leak_out), to_stderr=True)
send_packet(self, src_port_id, pkts[dst_port][i], pkts_num_leak_out)
if 'cisco-8000' in asic_type:
fill_leakout_plus_one(
Expand All @@ -5736,7 +5737,7 @@ def runTest(self):
# get all q_wm values for all port
dst_q_wm_res_all_port = [sai_thrift_read_port_watermarks(
self.dst_client, port_list['dst'][sid])[0] for sid in dst_port_ids]
log_message("queue watermark for all port is {}".format(dst_q_wm_res_all_port))
log_message("queue watermark for all port is {}".format(dst_q_wm_res_all_port), to_stderr=True)
expected_wm = pkt_count * cell_occupancy

def offset_text(offset):
Expand All @@ -5752,10 +5753,10 @@ def offset_text(offset):
upper = (expected_wm + margin) * cell_size
msg = "Queue: {}, lower {} {} = queue_wm {} = upper {} {}".format(
queue, lower, offset_text(qwm - lower), qwm, upper, offset_text(qwm - upper))
log_message(msg)
log_message(msg, to_stderr=True)
if not (lower <= qwm <= upper):
failures.append((dst_port_ids[dst_i], queue))
log_message("Failed check")
log_message("Failed check", to_stderr=True)
assert len(failures) == 0, "Failed on (dst port id, queue) for the following: {}".format(failures)

finally:
Expand Down
Loading