libnm, cli, ifcfg-rh: add NMSettingEthtool setting

System Internals / NetworkManager - Thomas Haller [redhat.com] - 10 August 2018 08:38 EDT

Note that in NetworkManager API (D-Bus, libnm, and nmcli), the features are called "feature-xyz". The "feature-" prefix is used, because NMSettingEthtool possibly will gain support for options that are not only -K|--offload|--features, for example -C|--coalesce.

The "xzy" suffix is either how ethtool utility calls the feature ("tso", "rx"). Or, if ethtool utility specifies no alias for that feature, it's the name from kernel's ETH_SS_FEATURES ("tx-tcp6-segmentation"). If possible, we prefer ethtool utility's naming.

Also note, how the features "feature-sg", "feature-tso", and "feature-tx" actually refer to multiple underlying kernel features at once. This too follows what ethtool utility does.

The functionality is not yet implemented server-side.

df30651b8 libnm, cli, ifcfg-rh: add NMSettingEthtool setting
Makefile.am | 8 +
clients/cli/connections.c | 3 +-
clients/common/meson.build | 2 +-
clients/common/nm-meta-setting-desc.c | 126 ++++++++
clients/common/nm-meta-setting-desc.h | 4 +
docs/libnm/libnm-docs.xml | 1 +
libnm-core/meson.build | 2 +
libnm-core/nm-core-internal.h | 5 +
libnm-core/nm-core-types.h | 1 +
libnm-core/nm-setting-ethtool.c | 342 +++++++++++++++++++++
libnm-core/nm-setting-ethtool.h | 83 +++++
libnm-core/nm-setting.c | 14 +
libnm-core/tests/test-general.c | 20 +-
libnm-core/tests/test-setting.c | 77 +++++
libnm/NetworkManager.h | 1 +
libnm/libnm.ver | 5 +
libnm/nm-autoptr.h | 1 +
po/POTFILES.in | 1 +
shared/meson.build | 2 +
shared/nm-ethtool-utils.c | 143 +++++++++
shared/nm-ethtool-utils.h | 79 +++++
shared/nm-meta-setting.c | 7 +
shared/nm-meta-setting.h | 1 +
.../plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 139 ++++++---
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c | 60 ++++
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h | 17 +
.../plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 154 ++++++----
...fg-test_write_wired_auto_negotiate_on.cexpected | 15 +
.../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 19 +-
29 files changed, 1241 insertions(+), 91 deletions(-)

Upstream: cgit.freedesktop.org


  • Share