systemd-link: Remove UDP Fragmentation Offload support. (#8183)
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.
This commit is contained in:
parent
6f1ea95493
commit
1e35c5ab27
|
@ -522,14 +522,6 @@
|
|||
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>
|
||||
|
|
|
@ -75,37 +75,6 @@
|
|||
#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(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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; \
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue