mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
nixos/networkd: add FairQueueingControlledDelay options
This commit is contained in:
parent
5b5c79c6a0
commit
dbc14e5a44
@ -1315,6 +1315,24 @@ let
|
|||||||
(assertRange "DefaultVirtualQueue" 1 16)
|
(assertRange "DefaultVirtualQueue" 1 16)
|
||||||
(assertValueOneOf "GenericRIO" boolValues)
|
(assertValueOneOf "GenericRIO" boolValues)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sectionFairQueueingControlledDelay = checkUnitConfig "FairQueueingControlledDelay" [
|
||||||
|
(assertOnlyFields [
|
||||||
|
"Parent"
|
||||||
|
"Handle"
|
||||||
|
"PacketLimit"
|
||||||
|
"MemoryLimitBytes"
|
||||||
|
"Flows"
|
||||||
|
"TargetSec"
|
||||||
|
"IntervalSec"
|
||||||
|
"QuantumBytes"
|
||||||
|
"ECN"
|
||||||
|
"CEThresholdSec"
|
||||||
|
])
|
||||||
|
(assertInt "PacketLimit")
|
||||||
|
(assertInt "Flows")
|
||||||
|
(assertValueOneOf "ECN" boolValues)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2170,6 +2188,17 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fairQueueingControlledDelayConfig = mkOption {
|
||||||
|
default = {};
|
||||||
|
example = { Parent = "root"; Flows = 5; };
|
||||||
|
type = types.addCheck (types.attrsOf unitOption) check.network.sectionFairQueueingControlledDelay;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Each attribute in this set specifies an option in the
|
||||||
|
`[FairQueueingControlledDelay]` section of the unit. See
|
||||||
|
{manpage}`systemd.network(5)` for details.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
@ -2669,6 +2698,10 @@ let
|
|||||||
[GenericRandomEarlyDetection]
|
[GenericRandomEarlyDetection]
|
||||||
${attrsToSection def.genericRandomEarlyDetectionConfig}
|
${attrsToSection def.genericRandomEarlyDetectionConfig}
|
||||||
''
|
''
|
||||||
|
+ optionalString (def.fairQueueingControlledDelayConfig != { }) ''
|
||||||
|
[FairQueueingControlledDelay]
|
||||||
|
${attrsToSection def.fairQueueingControlledDelayConfig}
|
||||||
|
''
|
||||||
+ def.extraConfig;
|
+ def.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user