RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 692410 - [RFE] Add code in network-scripts to enable more ETHTOOL_OPTS options
Summary: [RFE] Add code in network-scripts to enable more ETHTOOL_OPTS options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 693583 (view as bug list)
Depends On:
Blocks: 607248 GSS_6_2_PROPOSED 697582
TreeView+ depends on / blocked
 
Reported: 2011-03-31 09:45 UTC by J.H.M. Dassen (Ray)
Modified: 2018-11-30 22:59 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-12-06 18:09:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Customer's proposed patch (2.38 KB, patch)
2011-03-31 09:48 UTC, J.H.M. Dassen (Ray)
no flags Details | Diff
modified patch (2.40 KB, patch)
2011-06-28 18:31 UTC, Bill Nottingham
no flags Details | Diff
modified patch, v2 (2.42 KB, patch)
2011-06-28 18:36 UTC, Bill Nottingham
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 451058 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 696788 0 medium CLOSED [RFE] Add code in network-scripts to load static arp entries from ethers file 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Legacy) 54229 0 None None None Never
Red Hat Product Errata RHBA-2011:1528 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-12-06 01:02:05 UTC

Internal Links: 451058 696788

Description J.H.M. Dassen (Ray) 2011-03-31 09:45:10 UTC
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.

Comment 2 J.H.M. Dassen (Ray) 2011-03-31 09:48:11 UTC
Created attachment 489015 [details]
Customer's proposed patch

Comment 4 Bill Nottingham 2011-04-05 15:18:18 UTC
*** Bug 693583 has been marked as a duplicate of this bug. ***

Comment 6 VK 2011-04-15 04:52:31 UTC
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.

Comment 7 VK 2011-04-15 04:58:39 UTC
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.

Comment 18 Bill Nottingham 2011-06-28 18:31:45 UTC
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.

Comment 19 Bill Nottingham 2011-06-28 18:36:51 UTC
Created attachment 510342 [details]
modified patch, v2

Patch v2, fixed an IFS issue.

Comment 21 Bill Nottingham 2011-06-28 18:50:58 UTC
This is upstream commit 982b6eb.

Comment 23 Frank Hirtz 2011-08-03 18:38:10 UTC
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>

Comment 24 VK 2011-08-04 04:26:18 UTC
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

Comment 25 Bill Nottingham 2011-08-04 20:38:11 UTC
(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.

Comment 26 VK 2011-08-11 19:39:49 UTC
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

Comment 35 Petr Lautrbach 2011-10-17 11:37:21 UTC
    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.

Comment 36 Simon Matter 2011-10-18 05:16:37 UTC
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

Comment 37 errata-xmlrpc 2011-12-06 18:09:29 UTC
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


Note You need to log in before you can comment on or make changes to this bug.