Hide Forgot
2. What is the nature and description of the request? Enhancement to the network startup to allow for more ETHTOOL_OPTS option. 3. Why does the customer need this? (List the business requirements here) Customer requires certain options be used when bringing up network interfaces. Currently, the network-scripts don't allows for some of the ETHTOOL_OPTS that the customer needs/wants to use. Having system boot with required options via normal startup process is more convenient and "cleaner" that have to modify /etc/rc.local or perform manual steps post startup. 4. How would the customer like to achieve this? (List the functional requirements here) Modify network startup scripts such that all supported ethool command options may be set via the ETHTOOL_OPTS in the nic config files in /etc/sysconfig/network-scripts. 5. For each functional requirement listed in question 4, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. Specify desired ethtool options via ETHTOOL_OPTS variable in the network-scripts config files, boot the system, and check that the options were picked up. 6. Is there already an existing RFE upstream or in Red Hat bugzilla? I did not find any. 7. How quickly does this need resolved? (desired target release) Time frame is not too critical. This is a patch they've been carrying along since RHEL5.3 and they would like to see it get accepted upstream. If there is alternative solutions they're open to the idea. If this is something that could even make it in by RHEL 7/Fedora 16/17 it would be fine. 8. Does this request meet the RHEL Inclusion criteria (please review) Yes. 9. List the affected packages initscripts, ethtool. Others? 10. Would the customer be able to assist in testing this functionality if implemented? Yes.
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