Age | Commit message (Collapse) | Author | Files | Lines |
|
'ethtool -k eth0' generally works for unprivileged users, but in some
kernel versions ETHTOOL_GSSET_INFO wrongly returns -EPERM. We need
to fall back to the old offload operations in this case. Also, if
we get some other error code, report that before exiting.
Add regression test cases covering this and some other operations
that may fail (which were already handled correctly).
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|
|
Rewrite the offload get and set functions to use the generic features
API where available, while maintaining a similar output format.
Add the long options --show-features and --features as additional
aliases for -k and -K.
Where there is exactly one named feature corresponding to an old
offload name, show the feature using the old offload name. Where
there are multiple features corresponding to an old offload name,
show the features as a group, indented underneath it.
Add some test cases to check that this works properly with or without
the generic features API. (These may well be insufficient.)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|
|
When an offload feature is enabled or disabled, this can change the
state of other features that depend on it, or may itself be deferred
if it depends on a feature that is disabled. Report when this
happens, and fail if no offload features could be changed.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|
|
This is partly preparation for use of the new net device features API,
but is useful in its own right.
Replace repetitive code for getting/setting offload flags with data-
driven loops.
This changes error messages to use the same long names for offload
flags as in dump_offload(), and changes various exit codes to 1.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|
|
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|