Bug 692410
Summary: | [RFE] Add code in network-scripts to enable more ETHTOOL_OPTS options | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | J.H.M. Dassen (Ray) <rdassen> | ||||||||
Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 6.1 | CC: | asersen, azelinka, fhirtz, jeder, notting, pknirsch, plautrba, rbinkhor, simon.matter, vendor-redhat | ||||||||
Target Milestone: | rc | Keywords: | FutureFeature, Triaged | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | initscripts-9.03.24-1.el6 | Doc Type: | Enhancement | ||||||||
Doc Text: |
Cause
The network-scripts don't allows for some of the ETHTOOL_OPTS that
were needed.
Consequence
Certain ethtool options couldn't be used when bringing up network
interfaces.
Change
Network startup scripts were modified such that all supported ethool
command options may be set via the ETHTOOL_OPTS in the nic config files in
/etc/sysconfig/network-scripts.
Result
Specified desired ethtool options via ETHTOOL_OPTS variable in the
network-scripts config files are set after reboot.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2011-12-06 18:09:29 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 607248, 658636, 697582 | ||||||||||
Attachments: |
|
Description
J.H.M. Dassen (Ray)
2011-03-31 09:45:10 UTC
Created attachment 489015 [details]
Customer's proposed patch
*** Bug 693583 has been marked as a duplicate of this bug. *** This is an ancient bug (assumption that all ETHTOOL_OPTS are arguments to -s option) that we've requested a fix for when RHEL 3.x was current. Looking forward to a fix. Also, by way of documenting use cases: with more folks using 10GigE solutions in latency sensitive environments, ethtool tuning of things like interrupt coalescing parameters is more common. Allowing options to ethtool to be set in ifcfg-ethX would be useful and intuitive given that "ETHTOOL_OPTS" suggests this is possible. Created attachment 510341 [details] modified patch Here's a modified version of the patch that I'm planning to commit to HEAD (it should backport pretty cleanly.) This changes the patch so that you can specify multiple sets of options in ETHTOOL_OPTS. An example: ETHTOOL_OPTS="autoneg off; -K eth0 rx on; -A etho autoneg off" This should be backwards compatible, allow setting arbitrary options, and address the concerns from bug 693583. Created attachment 510342 [details]
modified patch, v2
Patch v2, fixed an IFS issue.
This is upstream commit 982b6eb. The patch tested out well for me: <snip> [root@vir ~]# rpm -q initscripts initscripts-9.03.23-1.el6.test.1.x86_64 [root@vir ~]# grep ETHT /etc/sysconfig/network-scripts/ifcfg-eth0 ETHTOOL_OPTS="-K eth0 tx off rx off; -C eth0 rx-usecs 10; -G eth0 rx 4096 tx 4096" [root@vir ~]# ethtool -k eth0 Offload parameters for eth0: rx-checksumming: off tx-checksumming: off scatter-gather: off tcp-segmentation-offload: off udp-fragmentation-offload: off generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off [root@vir ~]# ethtool -c eth0 Coalesce parameters for eth0: Adaptive RX: off TX: off stats-block-usecs: 0 sample-interval: 0 pkt-rate-low: 0 pkt-rate-high: 0 rx-usecs: 10 rx-frames: 0 rx-usecs-irq: 0 rx-frames-irq: 0 tx-usecs: 0 tx-frames: 0 tx-usecs-irq: 0 tx-frames-irq: 0 rx-usecs-low: 0 rx-frame-low: 0 tx-usecs-low: 0 tx-frame-low: 0 rx-usecs-high: 0 rx-frame-high: 0 tx-usecs-high: 0 tx-frame-high: 0 [root@vir ~]# ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardware settings: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 [root@vir ~]# </snip> Thanks for working on this. This will make my life easier. As a usability refinement, would it be possible to tokenize or somehow refer to the device with a variable name, such as ${DEVICE} or ${REALDEVICE} ? This would make it easier to maintain ifcfg-* files, especially on servers with lots of NICs. I have not had a chance to test this patch, so it may already work, but I'd like to request that this be an explicit design criteria if it isn't already. Thx (In reply to comment #24) > Thanks for working on this. This will make my life easier. > > As a usability refinement, would it be possible to tokenize or somehow refer to > the device with a variable name, such as ${DEVICE} or ${REALDEVICE} ? This > would make it easier to maintain ifcfg-* files, especially on servers with lots > of NICs. It works now *if* DEVICE is declared before ETHTOOL_OPTS in the ifcfg-* file, via normal shell interpretation. OK. I suspected it would work, but I wanted to emphasize this as a design requirement so that future changes will not break this capability. Thx Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause The network-scripts don't allows for some of the ETHTOOL_OPTS that were needed. Consequence Certain ethtool options couldn't be used when bringing up network interfaces. Change Network startup scripts were modified such that all supported ethool command options may be set via the ETHTOOL_OPTS in the nic config files in /etc/sysconfig/network-scripts. Result Specified desired ethtool options via ETHTOOL_OPTS variable in the network-scripts config files are set after reboot. May I strongly suggest the following small change: --- ethtool_set.orig 2011-10-18 07:05:57.000000000 +0200 +++ ethtool_set 2011-10-18 07:06:08.000000000 +0200 @@ -7,6 +7,7 @@ for opts in $ETHTOOL_OPTS ; do IFS=$oldifs; if [[ "${opts}" =~ [[:space:]]*- ]]; then + opts=$(eval echo ${opts}) /sbin/ethtool ${opts} else /sbin/ethtool -s ${REALDEVICE} ${opts} That way options can be set like below, which is more correct because additional options can be set on the same device (the real device) as it does with the old style -s options: ETHTOOL_OPTS="autoneg off; -K \$REALDEVICE rx on; -A \$REALDEVICE autoneg off" While doing so, please also add a comment about the new feature to sysconfig.txt, it's still missing there. Thanks, Simon Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1528.html |