nixos/networkd: add PFIFOFast options
This commit is contained in:
parent
f75ec30fee
commit
7a6cae0e15
@ -1200,6 +1200,13 @@ let
|
|||||||
(assertInt "PacketLimit")
|
(assertInt "PacketLimit")
|
||||||
(assertRange "PacketLimit" 0 4294967294)
|
(assertRange "PacketLimit" 0 4294967294)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sectionPFIFOFast = checkUnitConfig "PFIFOFast" [
|
||||||
|
(assertOnlyFields [
|
||||||
|
"Parent"
|
||||||
|
"Handle"
|
||||||
|
])
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1978,6 +1985,17 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pfifoFastConfig = mkOption {
|
||||||
|
default = {};
|
||||||
|
example = { Parent = "ingress"; };
|
||||||
|
type = types.addCheck (types.attrsOf unitOption) check.network.sectionPFIFOFast;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Each attribute in this set specifies an option in the
|
||||||
|
`[PFIFOFast]` 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;
|
||||||
@ -2449,6 +2467,10 @@ let
|
|||||||
[PFIFOHeadDrop]
|
[PFIFOHeadDrop]
|
||||||
${attrsToSection def.pfifoHeadDropConfig}
|
${attrsToSection def.pfifoHeadDropConfig}
|
||||||
''
|
''
|
||||||
|
+ optionalString (def.pfifoFastConfig != { }) ''
|
||||||
|
[PFIFOFast]
|
||||||
|
${attrsToSection def.pfifoFastConfig}
|
||||||
|
''
|
||||||
+ def.extraConfig;
|
+ def.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user