-
Notifications
You must be signed in to change notification settings - Fork 1k
qos-sai:dwrr:cisco-8000:Handle non-multiasic part as well for the dshell-script change. #16315
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 all commits
bbed02b
d2d8f5f
d4a4c79
fa3a6dc
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 |
|---|---|---|
|
|
@@ -3847,17 +3847,24 @@ def runTest(self): | |
| recv_pkt = scapy.Ether(received.packet) | ||
|
|
||
| if asic_type == 'cisco-8000': | ||
| cmd_opt = "" | ||
| if 'dst_asic_index' in self.test_params: | ||
| cmd_opt = "-n asic{}".format(self.test_params['dst_asic_index']) | ||
| out, err, ret = self.exec_cmd_on_dut( | ||
| self.dst_server_ip, | ||
| self.test_params['dut_username'], | ||
| self.test_params['dut_password'], | ||
| "show platform summary | egrep 'ASIC Count' | awk -F: '{print $2}'") | ||
| cmd_opt = "-n asic{}".format(self.test_params['dst_asic_index']) | ||
| if out[0].strip() == "1": | ||
| cmd_opt = "" | ||
|
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. we set scheduler to 5Gpps during the wrr test, but why don't we revert scheduler to default value after test complete?
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. @XuChen-MSFT : That was an artifact from earlier logic. Earlier this function used to copy and run, but now only copy. The run is done in the ptf code.
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. @XuChen-MSFT : Its not needed, since tx_enable is taking care of that part. It resets the scheduler as well.
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. can you update the function name of "copy_and_run_set_cir_script_cisco_8000()" to reflect its real behaviors
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. @XuChen-MSFT this is updated now. |
||
| cmd = "sudo show platform npu script {} -s set_scheduler.py".format(cmd_opt) | ||
| out, err, ret = self.exec_cmd_on_dut( | ||
| self.dst_server_ip, | ||
| self.test_params['dut_username'], | ||
| self.test_params['dut_password'], | ||
| cmd) | ||
| if err != "" and out == "": | ||
| if err and out == []: | ||
| raise RuntimeError("cmd({}) might have failed in the DUT. Error:{}".format(cmd, err)) | ||
| else: | ||
| print("Success in setting scheduler in DUT.", file=sys.stderr) | ||
| else: | ||
| # Release port | ||
| self.sai_thrift_port_tx_enable( | ||
|
|
||
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.
Function copy_and_run_set_cir_script_cisco_8000() just upload dshell script to dut, not really run this script. why do we call it copy_and_run__ ?
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.
Why is asic value not 'none' on single asic platforms? If the value is none, would it also solve the issue?
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.
@yxieca : Yes, it was "0" for single-asic. That is why the original code failed. If it were "None" the original code would have worked.