Red Hat Bugzilla – Bug 179877
RFE: support multiple commands on command line
Last modified: 2013-07-02 22:27:45 EDT
Description of problem:
Currently, there is no easy way similar to ETHTOOL_OPTS in ifcfg-eth* to
automatically configure pause control. ETHTOOL_OPTS in ifup-eth always uses
"ethtool -s", but to do flow control, we really want a second invocation of
"ethtool -A ...".
This is a trivial item to fix, it involves the creation of ETHTOOL_PAUSE_OPTS,
and handling it in ifup-eth the same way as ETHTOOL_OPTS. Patch is attached to
this bug ticket.
Created attachment 124108 [details]
add ETHTOOL_PAUSE_OPTS handing
Hm, but what if someone then wants to change the -G settings, etc - another
commandline option and invocation?
Perhaps we can... convince... the ethtool upstream to allow multiple commands on
the command line.
That would also be an acceptable approach.
Pushing to ethtool for the moment - allowing multiple commands on the command
line would make this much simpler.
Adding FutureFeature keyword to RFE's.
To repeat the answer that has been repeated since 2002:
ethtool utility is a small, lightweight utility that has a 1-1 correspondence between ethtool commands and the ethtool ioctls it issues to the kernel. (some of 'list' commands excepted) A single ethtool invocation performs a single ethtool ioctl.
Inside the kernel, a single ethtool ioctl is the smallest unit of atomicity available. The userspace utility matches that interface.
If you want to issue multiple ioctls, fix your infrastructure to perform multiple ethtool(1) invocations.
A simple, looping shell script will easily solve this bug. If it makes people happy, call this script "ethtool-multi".