summaryrefslogtreecommitdiff
path: root/libnm-core
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-07-16 15:42:07 +0200
committerThomas Haller <thaller@redhat.com>2018-08-10 10:38:19 +0200
commitbcd98d5422ec78551b1a4a9b68bc9120d691a19d (patch)
treed32f1c1698e006e83f6aab0c0c7d7790aa833d11 /libnm-core
parentae64db8be8a9c2fe1432fdf050b24156bbb94e23 (diff)
platform/ethtool: add code to get/set offload features via ethtool
Also, add two more features "tx-tcp-segmentation" and "tx-tcp6-segmentation". There are two reasons for that: - systemd-networkd supports setting these two features, so lets support them too (apparently they are important enough for networkd). - these two features are already implicitly covered by "tso". Like for the "ethtool" program, "tso" is an alias for several actual features. By adding two features that are already also covered by an alias (which sets multiple kernel names at once), we showcase how aliases for the same feature can coexist. In particular, note how setting "tso on tx-tcp6-segmentation off" will behave as one would expect: all 4 tso features covered by the alias are enabled, except that particular one.
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/nm-setting-ethtool.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/libnm-core/nm-setting-ethtool.h b/libnm-core/nm-setting-ethtool.h
index 763d2691e..10f5651b1 100644
--- a/libnm-core/nm-setting-ethtool.h
+++ b/libnm-core/nm-setting-ethtool.h
@@ -31,17 +31,19 @@ G_BEGIN_DECLS
/*****************************************************************************/
-#define NM_ETHTOOL_OPTNAME_FEATURE_GRO "feature-gro"
-#define NM_ETHTOOL_OPTNAME_FEATURE_GSO "feature-gso"
-#define NM_ETHTOOL_OPTNAME_FEATURE_LRO "feature-lro"
-#define NM_ETHTOOL_OPTNAME_FEATURE_NTUPLE "feature-ntuple"
-#define NM_ETHTOOL_OPTNAME_FEATURE_RX "feature-rx"
-#define NM_ETHTOOL_OPTNAME_FEATURE_RXHASH "feature-rxhash"
-#define NM_ETHTOOL_OPTNAME_FEATURE_RXVLAN "feature-rxvlan"
-#define NM_ETHTOOL_OPTNAME_FEATURE_SG "feature-sg"
-#define NM_ETHTOOL_OPTNAME_FEATURE_TSO "feature-tso"
-#define NM_ETHTOOL_OPTNAME_FEATURE_TX "feature-tx"
-#define NM_ETHTOOL_OPTNAME_FEATURE_TXVLAN "feature-txvlan"
+#define NM_ETHTOOL_OPTNAME_FEATURE_GRO "feature-gro"
+#define NM_ETHTOOL_OPTNAME_FEATURE_GSO "feature-gso"
+#define NM_ETHTOOL_OPTNAME_FEATURE_LRO "feature-lro"
+#define NM_ETHTOOL_OPTNAME_FEATURE_NTUPLE "feature-ntuple"
+#define NM_ETHTOOL_OPTNAME_FEATURE_RX "feature-rx"
+#define NM_ETHTOOL_OPTNAME_FEATURE_RXHASH "feature-rxhash"
+#define NM_ETHTOOL_OPTNAME_FEATURE_RXVLAN "feature-rxvlan"
+#define NM_ETHTOOL_OPTNAME_FEATURE_SG "feature-sg"
+#define NM_ETHTOOL_OPTNAME_FEATURE_TSO "feature-tso"
+#define NM_ETHTOOL_OPTNAME_FEATURE_TX "feature-tx"
+#define NM_ETHTOOL_OPTNAME_FEATURE_TXVLAN "feature-txvlan"
+#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP6_SEGMENTATION "feature-tx-tcp6-segmentation"
+#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_SEGMENTATION "feature-tx-tcp-segmentation"
gboolean nm_ethtool_optname_is_feature (const char *optname);