mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +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)
|
||||
(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 {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -2669,6 +2698,10 @@ let
|
||||
[GenericRandomEarlyDetection]
|
||||
${attrsToSection def.genericRandomEarlyDetectionConfig}
|
||||
''
|
||||
+ optionalString (def.fairQueueingControlledDelayConfig != { }) ''
|
||||
[FairQueueingControlledDelay]
|
||||
${attrsToSection def.fairQueueingControlledDelayConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user