-
Notifications
You must be signed in to change notification settings - Fork 1k
QoSHdrmPoolsize _tx_disable_enable for all destination ports in lag #11008
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
Changes from 2 commits
6131392
a672d75
5a1e838
fd759c1
2378ec6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2720,6 +2720,12 @@ def runTest(self): | |
| assert (len(sidx_dscp_pg_tuples) >= self.pgs_num) | ||
| print(sidx_dscp_pg_tuples, file=sys.stderr) | ||
| sys.stderr.flush() | ||
| # Collect destination ports that may be in a lag | ||
| pkt_dst_mac = self.router_mac if self.router_mac != '' else self.dst_port_mac | ||
| dst_port_ids = [] | ||
| for i in range(len(self.src_port_ids)): | ||
| dst_port_ids.append(get_rx_port(self, 0, self.src_port_ids[i], pkt_dst_mac, | ||
| self.dst_port_ip, self.src_port_ips[i])) | ||
|
|
||
| # get a snapshot of counter values at recv and transmit ports | ||
| # queue_counters value is not of our interest here | ||
|
|
@@ -2733,7 +2739,9 @@ def runTest(self): | |
| pkts_num_egr_mem = int(self.test_params['pkts_num_egr_mem']) | ||
|
|
||
| # Pause egress of dut xmit port | ||
| self.sai_thrift_port_tx_disable(self.dst_client, self.asic_type, [self.dst_port_id]) | ||
| # Disable all dst ports | ||
|
||
| uniq_dst_ports = list(set(dst_port_ids)) | ||
| self.sai_thrift_port_tx_disable(self.dst_client, self.asic_type, uniq_dst_ports) | ||
|
|
||
| try: | ||
| # send packets to leak out | ||
|
|
@@ -2841,10 +2849,10 @@ def runTest(self): | |
| .format(pkt_cnt, sidx_dscp_pg_tuples[i][1], sidx_dscp_pg_tuples[i][2], sidx_dscp_pg_tuples[i][0])) | ||
|
|
||
| if pkt_cnt == 10: | ||
| sys.exit("Too many pkts needed to trigger pfc: %d" % | ||
| (pkt_cnt)) | ||
| assert (recv_counters[sidx_dscp_pg_tuples[i][2]] > | ||
| recv_counters_bases[sidx_dscp_pg_tuples[i][0]][sidx_dscp_pg_tuples[i][2]]) | ||
| self.sai_thrift_port_tx_enable(self.dst_client, self.asic_type, uniq_dst_ports) | ||
| sys.exit("Too many pkts needed to trigger pfc: %d" % (pkt_cnt)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| assert(recv_counters[sidx_dscp_pg_tuples[i][2]] > | ||
| recv_counters_bases[sidx_dscp_pg_tuples[i][0]][sidx_dscp_pg_tuples[i][2]]) | ||
| print("%d packets for sid: %d, pg: %d to trigger pfc" % ( | ||
| pkt_cnt, self.src_port_ids[sidx_dscp_pg_tuples[i][0]], sidx_dscp_pg_tuples[i][2] - 2), | ||
| file=sys.stderr) | ||
|
|
@@ -2990,7 +2998,7 @@ def runTest(self): | |
| sys.stderr.flush() | ||
|
|
||
| finally: | ||
| self.sai_thrift_port_tx_enable(self.dst_client, self.asic_type, [self.dst_port_id]) | ||
| self.sai_thrift_port_tx_enable(self.dst_client, self.asic_type, uniq_dst_ports) | ||
|
|
||
|
|
||
| class SharedResSizeTest(sai_base_test.ThriftInterfaceDataPlane): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify why dst ports and dependent on src_port_id ? Should we check if destination port is part of the lag then disable all ports under that lag ?