]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemd-link: Remove UDP Fragmentation Offload support. (#8183)
authorRosen Penev <rosenp@gmail.com>
Sun, 18 Mar 2018 13:28:14 +0000 (06:28 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 18 Mar 2018 13:28:14 +0000 (14:28 +0100)
Support was killed in kernel 4.15 as well as ethtool 4.13.

Justification was lack of use by drivers and too much of a maintenance burden.
https://www.spinics.net/lists/netdev/msg443815.html

Also moved config_parse_warn_compat to conf-parser.[ch] to fix compile errors.

man/systemd.link.xml
src/core/load-fragment.c
src/core/load-fragment.h
src/shared/conf-parser.c
src/shared/conf-parser.h
src/udev/net/ethtool-util.c
src/udev/net/ethtool-util.h
src/udev/net/link-config-gperf.gperf

index 794e0e06fce1c8645eaf9ef85d3f82cfe4816f20..0b641014f497471e61ee1d4c24200aeecdf89c8b 100644 (file)
           Defaults to "unset".</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term><varname>UDPSegmentationOffload=</varname></term>
-        <listitem>
-          <para>The UDP Segmentation Offload (USO) when true enables
-          UDP segmentation offload. Takes a boolean value.
-          Defaults to "unset".</para>
-        </listitem>
-      </varlistentry>
     <varlistentry>
         <term><varname>GenericReceiveOffload=</varname></term>
         <listitem>
index 7f56149ead96ffc943ea04176442180180e2754f..c5b302a7833dad485aed11994d1e57a99f8c84ae 100644 (file)
 #include "utf8.h"
 #include "web-util.h"
 
-int config_parse_warn_compat(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-        Disabled reason = ltype;
-
-        switch(reason) {
-        case DISABLED_CONFIGURATION:
-                log_syntax(unit, LOG_DEBUG, filename, line, 0,
-                           "Support for option %s= has been disabled at compile time and it is ignored", lvalue);
-                break;
-        case DISABLED_LEGACY:
-                log_syntax(unit, LOG_INFO, filename, line, 0,
-                           "Support for option %s= has been removed and it is ignored", lvalue);
-                break;
-        case DISABLED_EXPERIMENTAL:
-                log_syntax(unit, LOG_INFO, filename, line, 0,
-                           "Support for option %s= has not yet been enabled and it is ignored", lvalue);
-                break;
-        };
-
-        return 0;
-}
-
 DEFINE_CONFIG_PARSE_ENUM(config_parse_collect_mode, collect_mode, CollectMode, "Failed to parse garbage collection mode");
 
 int config_parse_unit_deps(
index 163b5ce4855068c124079f25bf25e8f809c19668..ac0bea822064a4201c00f86fc179f068d21cb5ad 100644 (file)
@@ -28,7 +28,6 @@ int unit_load_fragment(Unit *u);
 
 void unit_dump_config_items(FILE *f);
 
-int config_parse_warn_compat(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_unit_deps(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_obsolete_unit_deps(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_unit_string_printf(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
@@ -129,9 +128,3 @@ int config_parse_collect_mode(const char *unit, const char *filename, unsigned l
 /* gperf prototypes */
 const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 extern const char load_fragment_gperf_nulstr[];
-
-typedef enum Disabled {
-        DISABLED_CONFIGURATION,
-        DISABLED_LEGACY,
-        DISABLED_EXPERIMENTAL,
-} Disabled;
index eac1176556c0628b26b3771ac8ac489a7bdead13..e7c901f761a43f417ad471acf1e6a704706c9826 100644 (file)
@@ -822,6 +822,37 @@ int config_parse_strv(
         return 0;
 }
 
+int config_parse_warn_compat(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+        Disabled reason = ltype;
+
+        switch(reason) {
+        case DISABLED_CONFIGURATION:
+                log_syntax(unit, LOG_DEBUG, filename, line, 0,
+                           "Support for option %s= has been disabled at compile time and it is ignored", lvalue);
+                break;
+        case DISABLED_LEGACY:
+                log_syntax(unit, LOG_INFO, filename, line, 0,
+                           "Support for option %s= has been removed and it is ignored", lvalue);
+                break;
+        case DISABLED_EXPERIMENTAL:
+                log_syntax(unit, LOG_INFO, filename, line, 0,
+                           "Support for option %s= has not yet been enabled and it is ignored", lvalue);
+                break;
+        };
+
+        return 0;
+}
+
 int config_parse_log_facility(
                 const char *unit,
                 const char *filename,
index 908f530713fddeeaebca83ac741b3f04966dd759..80fb2392e65969a70ca3cc335bb43b4eccab412f 100644 (file)
@@ -151,6 +151,7 @@ int config_parse_strv(GENERIC_PARSER_ARGS);
 int config_parse_sec(GENERIC_PARSER_ARGS);
 int config_parse_nsec(GENERIC_PARSER_ARGS);
 int config_parse_mode(GENERIC_PARSER_ARGS);
+int config_parse_warn_compat(GENERIC_PARSER_ARGS);
 int config_parse_log_facility(GENERIC_PARSER_ARGS);
 int config_parse_log_level(GENERIC_PARSER_ARGS);
 int config_parse_signal(GENERIC_PARSER_ARGS);
@@ -159,6 +160,12 @@ int config_parse_ifname(GENERIC_PARSER_ARGS);
 int config_parse_ip_port(GENERIC_PARSER_ARGS);
 int config_parse_join_controllers(GENERIC_PARSER_ARGS);
 
+typedef enum Disabled {
+        DISABLED_CONFIGURATION,
+        DISABLED_LEGACY,
+        DISABLED_EXPERIMENTAL,
+} Disabled;
+
 #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg)                \
         int function(GENERIC_PARSER_ARGS) {                             \
                 type *i = data, x;                                      \
index 9bdaef8d909b533c4d432248f1ce094975140ac7..1fdfc8540848fabeeefeabf5833942b857b9e612 100644 (file)
@@ -72,7 +72,6 @@ static const char* const netdev_feature_table[_NET_DEV_FEAT_MAX] = {
         [NET_DEV_FEAT_LRO]  = "rx-lro",
         [NET_DEV_FEAT_TSO]  = "tx-tcp-segmentation",
         [NET_DEV_FEAT_TSO6] = "tx-tcp6-segmentation",
-        [NET_DEV_FEAT_UFO]  = "tx-udp-fragmentation",
 };
 
 int ethtool_connect(int *ret) {
index 5681472a9a210acc3cfe18e4563b71c8ddecb669..0aeced00c81dc32e4187ff10b6ba15c836a40a16 100644 (file)
@@ -55,7 +55,6 @@ typedef enum NetDevFeature {
         NET_DEV_FEAT_LRO,
         NET_DEV_FEAT_TSO,
         NET_DEV_FEAT_TSO6,
-        NET_DEV_FEAT_UFO,
         _NET_DEV_FEAT_MAX,
         _NET_DEV_FEAT_INVALID = -1
 } NetDevFeature;
index 5cb126d870b7dfeff78f9accbb2061fa2ebd72d1..b4c3a45cf3037b9076e3a6e9022820d3551361f7 100644 (file)
@@ -44,6 +44,6 @@ Link.Port,                       config_parse_port,          0,
 Link.GenericSegmentationOffload, config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_GSO])
 Link.TCPSegmentationOffload,     config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_TSO])
 Link.TCP6SegmentationOffload,    config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_TSO6])
-Link.UDPSegmentationOffload,     config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_UFO])
+Link.UDPSegmentationOffload,     config_parse_warn_compat,   DISABLED_LEGACY,               0
 Link.GenericReceiveOffload,      config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_GRO])
 Link.LargeReceiveOffload,        config_parse_tristate,      0,                             offsetof(link_config, features[NET_DEV_FEAT_LRO])