Bug 1434236
| Summary: | ethtool returns incorrect exit code for error (stderr) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Vikram Hosakote <vhosakot> |
| Component: | ethtool | Assignee: | Ivan Vecera <ivecera> |
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | bnater, linville |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-11-03 18:48:14 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Vikram Hosakote
2017-03-21 03:28:15 UTC
Could you please provide an output from 'ethtool -k eth0' ? You are probably trying to change fixed (non-changeable) offloaded feature. Below is the output of "ethtool -k eth0". # ethtool -k eth0 Features for eth0: rx-checksumming: on [fixed] tx-checksumming: on tx-checksum-ipv4: off [fixed] tx-checksum-ip-generic: on tx-checksum-ipv6: off [fixed] tx-checksum-fcoe-crc: off [fixed] tx-checksum-sctp: off [fixed] scatter-gather: on tx-scatter-gather: on tx-scatter-gather-fraglist: off [fixed] tcp-segmentation-offload: on tx-tcp-segmentation: on tx-tcp-ecn-segmentation: on tx-tcp6-segmentation: on udp-fragmentation-offload: on generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off [fixed] rx-vlan-offload: off [fixed] tx-vlan-offload: off [fixed] ntuple-filters: off [fixed] receive-hashing: off [fixed] highdma: on [fixed] rx-vlan-filter: on [fixed] vlan-challenged: off [fixed] tx-lockless: off [fixed] netns-local: off [fixed] tx-gso-robust: off [fixed] tx-fcoe-segmentation: off [fixed] tx-gre-segmentation: off [fixed] tx-ipip-segmentation: off [fixed] tx-sit-segmentation: off [fixed] tx-udp_tnl-segmentation: off [fixed] tx-mpls-segmentation: off [fixed] fcoe-mtu: off [fixed] tx-nocache-copy: off loopback: off [fixed] rx-fcs: off [fixed] rx-all: off [fixed] tx-vlan-stag-hw-insert: off [fixed] rx-vlan-stag-hw-parse: off [fixed] rx-vlan-stag-filter: off [fixed] busy-poll: off [fixed] (In reply to Vikram Hosakote from comment #3) > Below is the output of "ethtool -k eth0". > > # ethtool -k eth0 > ... > large-receive-offload: off [fixed] > ... So you are trying to enable fixed feature (LRO in your case)... It is not possible to change such features so ethtool just informs about it... This is not an error. Then, why does ethtool print the output in stderr and return 0 (which is success)? (In reply to Vikram Hosakote from comment #5) > Then, why does ethtool print the output in stderr and return 0 (which is > success)? It's upstream behavior... please see commit like 5954d26 ("ethtool: Do not return error code if no changes were attempted"). This commit changes the return code when channel parameters were not changed... it returned non-zero but now zero although prints the message to stderr. If we change this behavior we could break existing scripts that assumes such messages on stderr output. ...and return zero is valid because an attempt to change fixed parameter is not an error state but a mistake of the user. |