Compare commits
No commits in common. "a25457f5b7689265bd2235c4da218896e7c5c1d0" and "14157349db981273ba0c7555e249c7b2ad1dfbea" have entirely different histories.
a25457f5b7
...
14157349db
|
@ -166,10 +166,6 @@ sensor:modalias:acpi:BMA250E*:dmi:bvnINSYDECorp.:bvrG1D_S165*:svnilife:pnS165:*
|
||||||
sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnX1D3_C806N:*
|
sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnX1D3_C806N:*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
# Chuwi Hi10 (CWI515)
|
|
||||||
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:*:svnDefaultstring:pnDefaultstring:*
|
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
|
||||||
|
|
||||||
# Chuwi Hi10 (CWI1515)
|
# Chuwi Hi10 (CWI1515)
|
||||||
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrP02A_C106.60E:*:svnDefaultstring:pnDefaultstring:*
|
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrP02A_C106.60E:*:svnDefaultstring:pnDefaultstring:*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|
|
@ -203,7 +203,7 @@ multi-user.target reached after 47.820s in userspace
|
||||||
jobs (and in particular not jobs that timed out).</para>
|
jobs (and in particular not jobs that timed out).</para>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title><command>systemd-analyze critical-chain</command></title>
|
<title><command>systemd-analyze time</command></title>
|
||||||
|
|
||||||
<programlisting>$ systemd-analyze critical-chain
|
<programlisting>$ systemd-analyze critical-chain
|
||||||
multi-user.target @47.820s
|
multi-user.target @47.820s
|
||||||
|
|
|
@ -1908,8 +1908,7 @@ SystemCallErrorNumber=EPERM</programlisting>
|
||||||
|
|
||||||
<para>The files listed with this directive will be read shortly before the process is executed (more
|
<para>The files listed with this directive will be read shortly before the process is executed (more
|
||||||
specifically, after all processes from a previous unit state terminated. This means you can generate these
|
specifically, after all processes from a previous unit state terminated. This means you can generate these
|
||||||
files in one unit state, and read it with this option in the next. The files are read from the file
|
files in one unit state, and read it with this option in the next).</para>
|
||||||
system of the service manager, before any file system changes like bind mounts take place).</para>
|
|
||||||
|
|
||||||
<para>Settings from these files override settings made with <varname>Environment=</varname>. If the same
|
<para>Settings from these files override settings made with <varname>Environment=</varname>. If the same
|
||||||
variable is set twice from these files, the files will be read in the order they are specified and the later
|
variable is set twice from these files, the files will be read in the order they are specified and the later
|
||||||
|
|
|
@ -2465,38 +2465,6 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ControlledDelayTargetSec=</varname></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
|
|
||||||
Defaults to unset and kernel's default is used.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ControlledDelayIntervalSec=</varname></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Takes a timespan. This is used to ensure that the measured minimum delay does not
|
|
||||||
become too stale. Defaults to unset and kernel's default is used.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ControlledDelayECN=</varname></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
|
|
||||||
unset and kernel's default is used.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ControlledDelayCEThresholdSec=</varname></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
|
|
||||||
Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>FairQueuingControlledDelayPacketLimit=</varname></term>
|
<term><varname>FairQueuingControlledDelayPacketLimit=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "alloc-util.h"
|
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
|
|
||||||
size_t page_size(void) _pure_;
|
size_t page_size(void) _pure_;
|
||||||
|
@ -89,7 +88,9 @@ static inline void* erase_and_free(void *p) {
|
||||||
|
|
||||||
l = malloc_usable_size(p);
|
l = malloc_usable_size(p);
|
||||||
explicit_bzero_safe(p, l);
|
explicit_bzero_safe(p, l);
|
||||||
return mfree(p);
|
free(p);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void erase_and_freep(void *p) {
|
static inline void erase_and_freep(void *p) {
|
||||||
|
|
|
@ -621,7 +621,7 @@ int unit_name_mangle_with_suffix(const char *name, const char *operation, UnitNa
|
||||||
goto good;
|
goto good;
|
||||||
log_full(flags & UNIT_NAME_MANGLE_WARN ? LOG_NOTICE : LOG_DEBUG,
|
log_full(flags & UNIT_NAME_MANGLE_WARN ? LOG_NOTICE : LOG_DEBUG,
|
||||||
"Glob pattern passed%s%s, but globs are not supported for this.",
|
"Glob pattern passed%s%s, but globs are not supported for this.",
|
||||||
operation ? " " : "", strempty(operation));
|
operation ? " " : "", operation ?: "");
|
||||||
suggest_escape = false;
|
suggest_escape = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -455,10 +455,10 @@ static int attach_tcrypt(
|
||||||
assert(name);
|
assert(name);
|
||||||
assert(key_file || (passwords && passwords[0]));
|
assert(key_file || (passwords && passwords[0]));
|
||||||
|
|
||||||
if (arg_pkcs11_uri)
|
if (arg_pkcs11_uri) {
|
||||||
/* Ask for a regular password */
|
log_error("Sorry, but tcrypt devices are currently not supported in conjunction with pkcs11 support.");
|
||||||
return log_error_errno(SYNTHETIC_ERRNO(EAGAIN),
|
return -EAGAIN; /* Ask for a regular password */
|
||||||
"Sorry, but tcrypt devices are currently not supported in conjunction with pkcs11 support.");
|
}
|
||||||
|
|
||||||
if (arg_tcrypt_hidden)
|
if (arg_tcrypt_hidden)
|
||||||
params.flags |= CRYPT_TCRYPT_HIDDEN_HEADER;
|
params.flags |= CRYPT_TCRYPT_HIDDEN_HEADER;
|
||||||
|
|
|
@ -828,7 +828,9 @@ static void source_disconnect(sd_event_source *s) {
|
||||||
if (s->prepare)
|
if (s->prepare)
|
||||||
prioq_remove(s->event->prepare, s, &s->prepare_index);
|
prioq_remove(s->event->prepare, s, &s->prepare_index);
|
||||||
|
|
||||||
event = TAKE_PTR(s->event);
|
event = s->event;
|
||||||
|
|
||||||
|
s->event = NULL;
|
||||||
LIST_REMOVE(sources, event->sources, s);
|
LIST_REMOVE(sources, event->sources, s);
|
||||||
event->n_sources--;
|
event->n_sources--;
|
||||||
|
|
||||||
|
|
|
@ -746,11 +746,7 @@ static const NLTypeSystem rtnl_nexthop_type_system = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const NLType rtnl_tca_option_data_codel_types[] = {
|
static const NLType rtnl_tca_option_data_codel_types[] = {
|
||||||
[TCA_CODEL_TARGET] = { .type = NETLINK_TYPE_U32 },
|
|
||||||
[TCA_CODEL_LIMIT] = { .type = NETLINK_TYPE_U32 },
|
[TCA_CODEL_LIMIT] = { .type = NETLINK_TYPE_U32 },
|
||||||
[TCA_CODEL_INTERVAL] = { .type = NETLINK_TYPE_U32 },
|
|
||||||
[TCA_CODEL_ECN] = { .type = NETLINK_TYPE_U32 },
|
|
||||||
[TCA_CODEL_CE_THRESHOLD] = { .type = NETLINK_TYPE_U32 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const NLType rtnl_tca_option_data_fq_types[] = {
|
static const NLType rtnl_tca_option_data_fq_types[] = {
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
#include "udev-util.h"
|
#include "udev-util.h"
|
||||||
#include "virt.h"
|
#include "virt.h"
|
||||||
|
|
||||||
/* use 128 MB for receive socket kernel queue. */
|
/* use 8 MB for receive socket kernel queue. */
|
||||||
#define RCVBUF_SIZE (128*1024*1024)
|
#define RCVBUF_SIZE (8*1024*1024)
|
||||||
|
|
||||||
static int log_message_warning_errno(sd_netlink_message *m, int err, const char *msg) {
|
static int log_message_warning_errno(sd_netlink_message *m, int err, const char *msg) {
|
||||||
const char *err_msg = NULL;
|
const char *err_msg = NULL;
|
||||||
|
|
|
@ -279,10 +279,6 @@ TrafficControlQueueingDiscipline.FairQueueTrafficPolicingOrphanMask, con
|
||||||
TrafficControlQueueingDiscipline.FairQueueTrafficPolicingPacing, config_parse_tc_fair_queue_traffic_policing_bool, 0, 0
|
TrafficControlQueueingDiscipline.FairQueueTrafficPolicingPacing, config_parse_tc_fair_queue_traffic_policing_bool, 0, 0
|
||||||
TrafficControlQueueingDiscipline.FairQueueTrafficPolicingCEThresholdSec, config_parse_tc_fair_queue_traffic_policing_usec, 0, 0
|
TrafficControlQueueingDiscipline.FairQueueTrafficPolicingCEThresholdSec, config_parse_tc_fair_queue_traffic_policing_usec, 0, 0
|
||||||
TrafficControlQueueingDiscipline.ControlledDelayPacketLimit, config_parse_tc_controlled_delay_u32, 0, 0
|
TrafficControlQueueingDiscipline.ControlledDelayPacketLimit, config_parse_tc_controlled_delay_u32, 0, 0
|
||||||
TrafficControlQueueingDiscipline.ControlledDelayTargetSec, config_parse_tc_controlled_delay_usec, 0, 0
|
|
||||||
TrafficControlQueueingDiscipline.ControlledDelayIntervalSec, config_parse_tc_controlled_delay_usec, 0, 0
|
|
||||||
TrafficControlQueueingDiscipline.ControlledDelayCEThresholdSec, config_parse_tc_controlled_delay_usec, 0, 0
|
|
||||||
TrafficControlQueueingDiscipline.ControlledDelayECN, config_parse_tc_controlled_delay_bool, 0, 0
|
|
||||||
/* backwards compatibility: do not add new entries to this section */
|
/* backwards compatibility: do not add new entries to this section */
|
||||||
Network.IPv4LL, config_parse_ipv4ll, 0, offsetof(Network, link_local)
|
Network.IPv4LL, config_parse_ipv4ll, 0, offsetof(Network, link_local)
|
||||||
DHCP.ClientIdentifier, config_parse_dhcp_client_identifier, 0, offsetof(Network, dhcp_client_identifier)
|
DHCP.ClientIdentifier, config_parse_dhcp_client_identifier, 0, offsetof(Network, dhcp_client_identifier)
|
||||||
|
|
|
@ -10,19 +10,6 @@
|
||||||
#include "qdisc.h"
|
#include "qdisc.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
||||||
static int controlled_delay_init(QDisc *qdisc) {
|
|
||||||
ControlledDelay *cd;
|
|
||||||
|
|
||||||
assert(qdisc);
|
|
||||||
|
|
||||||
cd = CODEL(qdisc);
|
|
||||||
|
|
||||||
cd->ce_threshold_usec = USEC_INFINITY;
|
|
||||||
cd->ecn = -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
|
static int controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
|
||||||
ControlledDelay *cd;
|
ControlledDelay *cd;
|
||||||
int r;
|
int r;
|
||||||
|
@ -43,30 +30,6 @@ static int controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_me
|
||||||
return log_link_error_errno(link, r, "Could not append TCA_CODEL_LIMIT attribute: %m");
|
return log_link_error_errno(link, r, "Could not append TCA_CODEL_LIMIT attribute: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cd->interval_usec > 0) {
|
|
||||||
r = sd_netlink_message_append_u32(req, TCA_CODEL_INTERVAL, cd->interval_usec);
|
|
||||||
if (r < 0)
|
|
||||||
return log_link_error_errno(link, r, "Could not append TCA_CODEL_INTERVAL attribute: %m");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cd->target_usec > 0) {
|
|
||||||
r = sd_netlink_message_append_u32(req, TCA_CODEL_TARGET, cd->target_usec);
|
|
||||||
if (r < 0)
|
|
||||||
return log_link_error_errno(link, r, "Could not append TCA_CODEL_TARGET attribute: %m");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cd->ecn >= 0) {
|
|
||||||
r = sd_netlink_message_append_u32(req, TCA_CODEL_ECN, cd->ecn);
|
|
||||||
if (r < 0)
|
|
||||||
return log_link_error_errno(link, r, "Could not append TCA_CODEL_ECN attribute: %m");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cd->ce_threshold_usec != USEC_INFINITY) {
|
|
||||||
r = sd_netlink_message_append_u32(req, TCA_CODEL_CE_THRESHOLD, cd->ce_threshold_usec);
|
|
||||||
if (r < 0)
|
|
||||||
return log_link_error_errno(link, r, "Could not append TCA_CODEL_CE_THRESHOLD attribute: %m");
|
|
||||||
}
|
|
||||||
|
|
||||||
r = sd_netlink_message_close_container(req);
|
r = sd_netlink_message_close_container(req);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_error_errno(link, r, "Could not close container TCA_OPTIONS: %m");
|
return log_link_error_errno(link, r, "Could not close container TCA_OPTIONS: %m");
|
||||||
|
@ -125,125 +88,8 @@ int config_parse_tc_controlled_delay_u32(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int config_parse_tc_controlled_delay_usec(
|
|
||||||
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) {
|
|
||||||
|
|
||||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
|
||||||
ControlledDelay *cd;
|
|
||||||
Network *network = data;
|
|
||||||
usec_t *p;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert(filename);
|
|
||||||
assert(lvalue);
|
|
||||||
assert(rvalue);
|
|
||||||
assert(data);
|
|
||||||
|
|
||||||
r = qdisc_new_static(QDISC_KIND_CODEL, network, filename, section_line, &qdisc);
|
|
||||||
if (r == -ENOMEM)
|
|
||||||
return log_oom();
|
|
||||||
if (r < 0)
|
|
||||||
return log_syntax(unit, LOG_ERR, filename, line, r,
|
|
||||||
"More than one kind of queueing discipline, ignoring assignment: %m");
|
|
||||||
|
|
||||||
cd = CODEL(qdisc);
|
|
||||||
|
|
||||||
if (streq(lvalue, "ControlledDelayTargetSec"))
|
|
||||||
p = &cd->target_usec;
|
|
||||||
else if (streq(lvalue, "ControlledDelayIntervalSec"))
|
|
||||||
p = &cd->interval_usec;
|
|
||||||
else if (streq(lvalue, "ControlledDelayCEThresholdSec"))
|
|
||||||
p = &cd->ce_threshold_usec;
|
|
||||||
else
|
|
||||||
assert_not_reached("Invalid lvalue");
|
|
||||||
|
|
||||||
if (isempty(rvalue)) {
|
|
||||||
if (streq(lvalue, "ControlledDelayCEThresholdSec"))
|
|
||||||
*p = USEC_INFINITY;
|
|
||||||
else
|
|
||||||
*p = 0;
|
|
||||||
|
|
||||||
qdisc = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = parse_sec(rvalue, p);
|
|
||||||
if (r < 0) {
|
|
||||||
log_syntax(unit, LOG_ERR, filename, line, r,
|
|
||||||
"Failed to parse '%s=', ignoring assignment: %s",
|
|
||||||
lvalue, rvalue);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
qdisc = NULL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int config_parse_tc_controlled_delay_bool(
|
|
||||||
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) {
|
|
||||||
|
|
||||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
|
||||||
ControlledDelay *cd;
|
|
||||||
Network *network = data;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert(filename);
|
|
||||||
assert(lvalue);
|
|
||||||
assert(rvalue);
|
|
||||||
assert(data);
|
|
||||||
|
|
||||||
r = qdisc_new_static(QDISC_KIND_CODEL, network, filename, section_line, &qdisc);
|
|
||||||
if (r == -ENOMEM)
|
|
||||||
return log_oom();
|
|
||||||
if (r < 0)
|
|
||||||
return log_syntax(unit, LOG_ERR, filename, line, r,
|
|
||||||
"More than one kind of queueing discipline, ignoring assignment: %m");
|
|
||||||
|
|
||||||
cd = CODEL(qdisc);
|
|
||||||
|
|
||||||
if (isempty(rvalue)) {
|
|
||||||
cd->ecn = -1;
|
|
||||||
|
|
||||||
qdisc = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = parse_boolean(rvalue);
|
|
||||||
if (r < 0) {
|
|
||||||
log_syntax(unit, LOG_ERR, filename, line, r,
|
|
||||||
"Failed to parse '%s=', ignoring assignment: %s",
|
|
||||||
lvalue, rvalue);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
cd->ecn = r;
|
|
||||||
qdisc = NULL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QDiscVTable codel_vtable = {
|
const QDiscVTable codel_vtable = {
|
||||||
.object_size = sizeof(ControlledDelay),
|
.object_size = sizeof(ControlledDelay),
|
||||||
.tca_kind = "codel",
|
.tca_kind = "codel",
|
||||||
.init = controlled_delay_init,
|
|
||||||
.fill_message = controlled_delay_fill_message,
|
.fill_message = controlled_delay_fill_message,
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,15 +10,10 @@ typedef struct ControlledDelay {
|
||||||
QDisc meta;
|
QDisc meta;
|
||||||
|
|
||||||
uint32_t packet_limit;
|
uint32_t packet_limit;
|
||||||
usec_t interval_usec;
|
|
||||||
usec_t target_usec;
|
|
||||||
usec_t ce_threshold_usec;
|
|
||||||
int ecn;
|
|
||||||
} ControlledDelay;
|
} ControlledDelay;
|
||||||
|
|
||||||
DEFINE_QDISC_CAST(CODEL, ControlledDelay);
|
DEFINE_QDISC_CAST(CODEL, ControlledDelay);
|
||||||
extern const QDiscVTable codel_vtable;
|
extern const QDiscVTable codel_vtable;
|
||||||
|
|
||||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_u32);
|
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_u32);
|
||||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_usec);
|
|
||||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_bool);
|
|
||||||
|
|
|
@ -236,10 +236,6 @@ int unit_file_find_dropin_paths(
|
||||||
|
|
||||||
assert(ret);
|
assert(ret);
|
||||||
|
|
||||||
SET_FOREACH(name, names, i)
|
|
||||||
STRV_FOREACH(p, lookup_path)
|
|
||||||
(void) unit_file_find_dirs(original_root, unit_path_cache, *p, name, dir_suffix, &dirs);
|
|
||||||
|
|
||||||
/* All the names in the unit are of the same type so just grab one. */
|
/* All the names in the unit are of the same type so just grab one. */
|
||||||
name = (char*) set_first(names);
|
name = (char*) set_first(names);
|
||||||
if (name) {
|
if (name) {
|
||||||
|
@ -251,7 +247,7 @@ int unit_file_find_dropin_paths(
|
||||||
"Failed to to derive unit type from unit name: %s",
|
"Failed to to derive unit type from unit name: %s",
|
||||||
name);
|
name);
|
||||||
|
|
||||||
/* Special top level drop in for "<unit type>.<suffix>". Add this last as it's the most generic
|
/* Special top level drop in for "<unit type>.<suffix>". Add this first as it's the most generic
|
||||||
* and should be able to be overridden by more specific drop-ins. */
|
* and should be able to be overridden by more specific drop-ins. */
|
||||||
STRV_FOREACH(p, lookup_path)
|
STRV_FOREACH(p, lookup_path)
|
||||||
(void) unit_file_find_dirs(original_root,
|
(void) unit_file_find_dirs(original_root,
|
||||||
|
@ -262,6 +258,10 @@ int unit_file_find_dropin_paths(
|
||||||
&dirs);
|
&dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SET_FOREACH(name, names, i)
|
||||||
|
STRV_FOREACH(p, lookup_path)
|
||||||
|
(void) unit_file_find_dirs(original_root, unit_path_cache, *p, name, dir_suffix, &dirs);
|
||||||
|
|
||||||
if (strv_isempty(dirs)) {
|
if (strv_isempty(dirs)) {
|
||||||
*ret = NULL;
|
*ret = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -5937,7 +5937,7 @@ static int cat(int argc, char *argv[], void *userdata) {
|
||||||
char **name;
|
char **name;
|
||||||
sd_bus *bus;
|
sd_bus *bus;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
int r, rc = 0;
|
int r;
|
||||||
|
|
||||||
/* Include all units by default — i.e. continue as if the --all
|
/* Include all units by default — i.e. continue as if the --all
|
||||||
* option was used */
|
* option was used */
|
||||||
|
@ -5982,12 +5982,8 @@ static int cat(int argc, char *argv[], void *userdata) {
|
||||||
}
|
}
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (r == 0) {
|
if (r == 0)
|
||||||
/* Skip units which have no on-disk counterpart, but
|
return -ENOENT;
|
||||||
* propagate the error to the user */
|
|
||||||
rc = -ENOENT;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (first)
|
if (first)
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -6013,7 +6009,7 @@ static int cat(int argc, char *argv[], void *userdata) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_property(int argc, char *argv[], void *userdata) {
|
static int set_property(int argc, char *argv[], void *userdata) {
|
||||||
|
|
|
@ -117,30 +117,6 @@ EOF
|
||||||
clear_services a b c
|
clear_services a b c
|
||||||
}
|
}
|
||||||
|
|
||||||
test_hierarchical_dropins () {
|
|
||||||
echo "Testing hierarchical dropins..."
|
|
||||||
echo "*** test service.d/ top level drop-in"
|
|
||||||
create_services a-b-c
|
|
||||||
check_ko a-b-c ExecCondition "/bin/echo service.d"
|
|
||||||
check_ko a-b-c ExecCondition "/bin/echo a-.service.d"
|
|
||||||
check_ko a-b-c ExecCondition "/bin/echo a-b-.service.d"
|
|
||||||
check_ko a-b-c ExecCondition "/bin/echo a-b-c.service.d"
|
|
||||||
|
|
||||||
for dropin in service.d a-.service.d a-b-.service.d a-b-c.service.d; do
|
|
||||||
mkdir -p /usr/lib/systemd/system/$dropin
|
|
||||||
echo "
|
|
||||||
[Service]
|
|
||||||
ExecCondition=/bin/echo $dropin
|
|
||||||
" > /usr/lib/systemd/system/$dropin/override.conf
|
|
||||||
check_ok a-b-c ExecCondition "/bin/echo $dropin"
|
|
||||||
done
|
|
||||||
for dropin in service.d a-.service.d a-b-.service.d a-b-c.service.d; do
|
|
||||||
rm -rf /usr/lib/systemd/system/$dropin
|
|
||||||
done
|
|
||||||
|
|
||||||
clear_services a-b-c
|
|
||||||
}
|
|
||||||
|
|
||||||
test_template_dropins () {
|
test_template_dropins () {
|
||||||
echo "Testing template dropins..."
|
echo "Testing template dropins..."
|
||||||
|
|
||||||
|
@ -457,7 +433,6 @@ test_invalid_dropins () {
|
||||||
}
|
}
|
||||||
|
|
||||||
test_basic_dropins
|
test_basic_dropins
|
||||||
test_hierarchical_dropins
|
|
||||||
test_template_dropins
|
test_template_dropins
|
||||||
test_alias_dropins
|
test_alias_dropins
|
||||||
test_masked_dropins
|
test_masked_dropins
|
||||||
|
|
|
@ -299,7 +299,3 @@ FairQueueTrafficPolicingOrphanMask=
|
||||||
FairQueueTrafficPolicingPacing=
|
FairQueueTrafficPolicingPacing=
|
||||||
FairQueueTrafficPolicingCEThresholdSec=
|
FairQueueTrafficPolicingCEThresholdSec=
|
||||||
ControlledDelayPacketLimit=
|
ControlledDelayPacketLimit=
|
||||||
ControlledDelayTargetSec=
|
|
||||||
ControlledDelayIntervalSec=
|
|
||||||
ControlledDelayCEThresholdSec=
|
|
||||||
ControlledDelayECN=
|
|
||||||
|
|
|
@ -16,11 +16,3 @@ FairQueueTrafficPolicingBuckets=512
|
||||||
FairQueueTrafficPolicingOrphanMask=511
|
FairQueueTrafficPolicingOrphanMask=511
|
||||||
FairQueueTrafficPolicingPacing=yes
|
FairQueueTrafficPolicingPacing=yes
|
||||||
FairQueueTrafficPolicingCEThresholdSec=100ms
|
FairQueueTrafficPolicingCEThresholdSec=100ms
|
||||||
|
|
||||||
[TrafficControlQueueingDiscipline]
|
|
||||||
Parent=clsact
|
|
||||||
ControlledDelayPacketLimit=2000
|
|
||||||
ControlledDelayTargetSec=10ms
|
|
||||||
ControlledDelayIntervalSec=50ms
|
|
||||||
ControlledDelayECN=yes
|
|
||||||
ControlledDelayCEThresholdSec=100ms
|
|
|
@ -1562,7 +1562,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||||
'25-neighbor-ip-dummy.network',
|
'25-neighbor-ip-dummy.network',
|
||||||
'25-neighbor-ip.network',
|
'25-neighbor-ip.network',
|
||||||
'25-nexthop.network',
|
'25-nexthop.network',
|
||||||
'25-qdisc-fq-codel.network',
|
'25-qdisc-fq.network',
|
||||||
'25-qdisc-netem-and-fqcodel.network',
|
'25-qdisc-netem-and-fqcodel.network',
|
||||||
'25-qdisc-tbf-and-sfq.network',
|
'25-qdisc-tbf-and-sfq.network',
|
||||||
'25-route-ipv6-src.network',
|
'25-route-ipv6-src.network',
|
||||||
|
@ -2157,7 +2157,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||||
self.assertRegex(output, 'perturb 5sec')
|
self.assertRegex(output, 'perturb 5sec')
|
||||||
|
|
||||||
def test_qdisc2(self):
|
def test_qdisc2(self):
|
||||||
copy_unit_to_networkd_unit_path('25-qdisc-fq-codel.network', '12-dummy.netdev')
|
copy_unit_to_networkd_unit_path('25-qdisc-fq.network', '12-dummy.netdev')
|
||||||
start_networkd()
|
start_networkd()
|
||||||
|
|
||||||
self.wait_online(['dummy98:routable'])
|
self.wait_online(['dummy98:routable'])
|
||||||
|
@ -2166,8 +2166,6 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||||
print(output)
|
print(output)
|
||||||
self.assertRegex(output, 'qdisc fq')
|
self.assertRegex(output, 'qdisc fq')
|
||||||
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511 quantum 1500 initial_quantum 13000 maxrate 1Mbit')
|
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511 quantum 1500 initial_quantum 13000 maxrate 1Mbit')
|
||||||
self.assertRegex(output, 'qdisc codel')
|
|
||||||
self.assertRegex(output, 'limit 2000p target 10.0ms ce_threshold 100.0ms interval 50.0ms ecn')
|
|
||||||
|
|
||||||
class NetworkdStateFileTests(unittest.TestCase, Utilities):
|
class NetworkdStateFileTests(unittest.TestCase, Utilities):
|
||||||
links = [
|
links = [
|
||||||
|
|
|
@ -15,7 +15,7 @@ DefaultDependencies=no
|
||||||
Before=sockets.target
|
Before=sockets.target
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ReceiveBuffer=128M
|
ReceiveBuffer=8M
|
||||||
ListenNetlink=route 1361
|
ListenNetlink=route 1361
|
||||||
PassCredentials=yes
|
PassCredentials=yes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue