Bug 519535
Summary: | ifup script assumes -s option for any ETHTOOL_OPTS settings. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | griznog <griznog> | ||||
Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> | ||||
Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE <qe-baseos-auto> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 5.3 | CC: | abd4arraafi, notting | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-08-27 03:11:48 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: | |||||||
Attachments: |
|
Description
griznog
2009-08-27 00:00:46 UTC
Created attachment 358796 [details]
Add additional ETHTOOL_OPTS_* options to ifup script.
This patch adds handling for 4 new variables in the ifcfg-eth* file:
ETHTOOL_OPTS_GENERIC
ETHTOOL_OPTS_PAUSE
ETHTOOL_OPTS_COALESCE
ETHTOOL_OPTS_OFFLOAD
If ETHTOOL_OPTS is defined, then the script behaves in the classic manner, passing those options to 'ethtool -s'. If ETHTOOL_OPTS is not defined, then the 4 new variables are checked and for each one that is defined, ethtool is called with the appropriate flag and the ETHTOOL_OPTS_* settings. So that for my case the following in ifcfg-eth1,
ETHTOOL_OPTS_OFFLOAD="tso off"
would result in
ethtool -K eth1 tso off
I have only lightly tested this patch on one server, mainly for syntax, with the ETHTOOL_OPTS_OFFLOAD variable set, no bonding or any other special networking configurations. Just throwing out a possible idea for adding the functionality without breaking backward compatibility.
ethtool tweaking is the sort of device-specific configuration that really should be udev rules. For example, a sample /etc/udev/rules.d/50-ethtool.rules: ACTION=="add", SUBSYSTEM=="net", NAME=="eth0", RUN+="/sbin/ethtool <your opts here>" Since the base ETHTOOL_OPTS predates udev for device-specific configuration, we'll keep it around. But I'd prefer not to extend it any more. Could we revisit this, please? RHEL6 correctly parses ETHTOOL_OPTS in the ifcfg-eth* files, but RHEL5 does not. Compare the OP's details to RHEL6 network-functions script: mock6 network-scripts]$ grep -A 8 ETHTOOL_OPTS * network-functions: for opts in $ETHTOOL_OPTS ; do network-functions- IFS=$oldifs; network-functions- if [[ "${opts}" =~ [[:space:]]*- ]]; then network-functions- /sbin/ethtool $opts network-functions- else network-functions- /sbin/ethtool -s ${REALDEVICE} $opts network-functions- fi network-functions- IFS=';'; network-functions- done Could we have the behavior match? |