nixos/networkd: add BFIFO options
This commit is contained in:
parent
f2ca28f658
commit
d9e1963a15
|
@ -1173,6 +1173,14 @@ let
|
||||||
(assertInt "PerturbPeriodSec")
|
(assertInt "PerturbPeriodSec")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sectionBFIFO = checkUnitConfig "BFIFO" [
|
||||||
|
(assertOnlyFields [
|
||||||
|
"Parent"
|
||||||
|
"Handle"
|
||||||
|
"LimitBytes"
|
||||||
|
])
|
||||||
|
];
|
||||||
|
};
|
||||||
sectionPFIFO = checkUnitConfig "PFIFO" [
|
sectionPFIFO = checkUnitConfig "PFIFO" [
|
||||||
(assertOnlyFields [
|
(assertOnlyFields [
|
||||||
"Parent"
|
"Parent"
|
||||||
|
@ -1927,6 +1935,17 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bfifoConfig = mkOption {
|
||||||
|
default = {};
|
||||||
|
example = { Parent = "ingress"; LimitBytes = "20K"; };
|
||||||
|
type = types.addCheck (types.attrsOf unitOption) check.network.sectionBFIFO;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Each attribute in this set specifies an option in the
|
||||||
|
`[BFIFO]` section of the unit. See
|
||||||
|
{manpage}`systemd.network(5)` for details.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
pfifoConfig = mkOption {
|
pfifoConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Parent = "ingress"; PacketLimit = "300"; };
|
example = { Parent = "ingress"; PacketLimit = "300"; };
|
||||||
|
@ -2397,6 +2416,10 @@ let
|
||||||
[StochasticFairnessQueueing]
|
[StochasticFairnessQueueing]
|
||||||
${attrsToSection def.stochasticFairnessQueueingConfig}
|
${attrsToSection def.stochasticFairnessQueueingConfig}
|
||||||
''
|
''
|
||||||
|
+ optionalString (def.bfifoConfig != { }) ''
|
||||||
|
[BFIFO]
|
||||||
|
${attrsToSection def.bfifoConfig}
|
||||||
|
''
|
||||||
+ optionalString (def.pfifoConfig != { }) ''
|
+ optionalString (def.pfifoConfig != { }) ''
|
||||||
[PFIFO]
|
[PFIFO]
|
||||||
${attrsToSection def.pfifoConfig}
|
${attrsToSection def.pfifoConfig}
|
||||||
|
|
Loading…
Reference in a new issue