mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
nixos/networkd: add FairQueueing options
This commit is contained in:
parent
dbc14e5a44
commit
cf470ebd88
@ -1333,6 +1333,26 @@ let
|
||||
(assertInt "Flows")
|
||||
(assertValueOneOf "ECN" boolValues)
|
||||
];
|
||||
|
||||
sectionFairQueueing = checkUnitConfig "FairQueueing" [
|
||||
(assertOnlyFields [
|
||||
"Parent"
|
||||
"Handle"
|
||||
"PacketLimit"
|
||||
"FlowLimit"
|
||||
"QuantumBytes"
|
||||
"InitualQuantumBytes"
|
||||
"MaximumRate"
|
||||
"Buckets"
|
||||
"OrphanMask"
|
||||
"Pacing"
|
||||
"CEThresholdSec"
|
||||
])
|
||||
(assertInt "PacketLimit")
|
||||
(assertInt "FlowLimit")
|
||||
(assertInt "OrphanMask")
|
||||
(assertValueOneOf "Pacing" boolValues)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -2199,6 +2219,17 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
fairQueueingConfig = mkOption {
|
||||
default = {};
|
||||
example = { Parent = "root"; FlowLimit = 5; };
|
||||
type = types.addCheck (types.attrsOf unitOption) check.network.sectionFairQueueing;
|
||||
description = lib.mdDoc ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[FairQueueing]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -2702,6 +2733,10 @@ let
|
||||
[FairQueueingControlledDelay]
|
||||
${attrsToSection def.fairQueueingControlledDelayConfig}
|
||||
''
|
||||
+ optionalString (def.fairQueueingConfig != { }) ''
|
||||
[FairQueueing]
|
||||
${attrsToSection def.fairQueueingConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user