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

set the queue length to original values after test #2893

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vaishnavibhat
Copy link
Contributor

ethtool -L option tests for different rx and tx length. The patch works on retrieving the original values for the interface and setting the rx and tx values to original values after the test.

@vaishnavibhat
Copy link
Contributor Author

Before test:
ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 16
TX: 16
Other: n/a
Combined: n/a
Current hardware settings:
RX: 8
TX: 2
Other: n/a
Combined: n/a

During test:
ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 16
TX: 16
Other: n/a
Combined: n/a
Current hardware settings:
RX: 9
TX: 3
Other: n/a
Combined: n/a

ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 16
TX: 16
Other: n/a
Combined: n/a
Current hardware settings:
RX: 10
TX: 10
Other: n/a
Combined: n/a

After test: (value reset back to original queue length)
ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX: 16
TX: 16
Other: n/a
Combined: n/a
Current hardware settings:
RX: 8
TX: 2
Other: n/a
Combined: n/a

@vaishnavibhat
Copy link
Contributor Author

avocado run ethtool_test.py -m ethtool_vnic_test.yaml --max-parallel-tasks=1
JOB ID : 9d0560f21e191de83fad36a1ae9b055d7a89989d
JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-09-11T06.00-9d0560f/job.log
(1/9) ethtool_test.py:Ethtool.test_ethtool;run-args-PrivateFlag-7b2c: STARTED
(1/9) ethtool_test.py:Ethtool.test_ethtool;run-args-PrivateFlag-7b2c: CANCEL: Device Doesn't support Private flags (4.27 s)
(2/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Driver-3ca4: STARTED
(2/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Driver-3ca4: PASS (7.08 s)
(3/9) ethtool_test.py:Ethtool.test_ethtool;run-args-RingParameter-0624: STARTED
(3/9) ethtool_test.py:Ethtool.test_ethtool;run-args-RingParameter-0624: PASS (7.11 s)
(4/9) ethtool_test.py:Ethtool.test_ethtool;run-args-ShowOffloadProtocolFeature-fb76: STARTED
(4/9) ethtool_test.py:Ethtool.test_ethtool;run-args-ShowOffloadProtocolFeature-fb76: PASS (7.03 s)
(5/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Statistics-c286: STARTED
(5/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Statistics-c286: PASS (7.07 s)
(6/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-permaddr-402c: STARTED
(6/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-permaddr-402c: PASS (7.17 s)
(7/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-time-stamping-16f5: STARTED
(7/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-time-stamping-16f5: PASS (7.15 s)
(8/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-channels-136a: STARTED
(8/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Show-channels-136a: PASS (7.17 s)
(9/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Set-channels-combined_channel-other_channel-1ee2: STARTED
(9/9) ethtool_test.py:Ethtool.test_ethtool;run-args-Set-channels-combined_channel-other_channel-1ee2: PASS (83.60 s)
RESULTS : PASS 8 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 1
JOB HTML : /root/avocado-fvt-wrapper/results/job-2024-09-11T06.00-9d0560f/results.html
JOB TIME : 461.77 s

job.log

debug.log

@Naresh-ibm Naresh-ibm self-assigned this Sep 12, 2024
cmd = "ethtool %s %s %s %s %s %s %s %s %s %s" % (
self.args, self.interface, self.param[0], self.default_set[0],
self.param[1], self.default_set[1], self.param[2],
self.default_set[2], self.param[3], self.default_set[3])
Copy link
Collaborator

Choose a reason for hiding this comment

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

@vaishnavibhat can you re-frame this as below,

cmd = f"ethtool {self.args} {self.interface} {self.param[0]} {self.default_set[0]}
             { self.param[1]} {self.default_set[1]} {self.param[2]} {self.default_set[2]} {self.param[3]}    
             {self.default_set[3])}"

This will help, not to miss any parameter and reference to the variables.

ret = process.run(cmd, shell=True, verbose=True,
ignore_status=True)
if ret.exit_status != 0:
self.fail("%s %s" % (self.args, ret.stderr_text))
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

@Naresh-ibm
Copy link
Collaborator

@vaishnavibhat can you please re-push the code with suggestion?

ethtool -L option tests for different rx and tx length.
The patch works on retrieving the original values for the
interface and setting the rx and tx values to original
values after the test.

Signed-off-by: Vaishnavi Bhat <[email protected]>
#self.fail("%s %s" % (self.args, ret.stderr_text))
self.fail(f"{self.args} {ret.stderr_text}")
# Set queue values to original values
#cmd = "ethtool %s %s %s %s %s %s %s %s %s %s" % (
Copy link
Collaborator

Choose a reason for hiding this comment

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

@vaishnavibhat Thanks for incorporating the changes, can you please remove the commented lines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants