@@ -1300,6 +1300,21 @@ let
13001300 ( assertInt "StrictBands" )
13011301 ( assertRange "StrictBands" 1 16 )
13021302 ] ;
1303+
1304+ sectionGenericRandomEarlyDetection = checkUnitConfig "GenericRandomEarlyDetection" [
1305+ ( assertOnlyFields [
1306+ "Parent"
1307+ "Handle"
1308+ "VirtualQueues"
1309+ "DefaultVirtualQueue"
1310+ "GenericRIO"
1311+ ] )
1312+ ( assertInt "VirtualQueues" )
1313+ ( assertRange "VirtualQueues" 1 16 )
1314+ ( assertInt "DefaultVirtualQueue" )
1315+ ( assertRange "DefaultVirtualQueue" 1 16 )
1316+ ( assertValueOneOf "GenericRIO" boolValues )
1317+ ] ;
13031318 } ;
13041319 } ;
13051320
@@ -2144,6 +2159,17 @@ let
21442159 '' ;
21452160 } ;
21462161
2162+ genericRandomEarlyDetectionConfig = mkOption {
2163+ default = { } ;
2164+ example = { Parent = "root" ; VirtualQueues = 5 ; DefaultVirtualQueue = 3 ; } ;
2165+ type = types . addCheck ( types . attrsOf unitOption ) check . network . sectionGenericRandomEarlyDetection ;
2166+ description = lib . mdDoc ''
2167+ Each attribute in this set specifies an option in the
2168+ `[GenericRandomEarlyDetection]` section of the unit. See
2169+ {manpage}`systemd.network(5)` for details.
2170+ '' ;
2171+ } ;
2172+
21472173 name = mkOption {
21482174 type = types . nullOr types . str ;
21492175 default = null ;
@@ -2639,6 +2665,10 @@ let
26392665 [EnhancedTransmissionSelection]
26402666 ${ attrsToSection def . enhancedTransmissionSelectionConfig }
26412667 ''
2668+ + optionalString ( def . genericRandomEarlyDetectionConfig != { } ) ''
2669+ [GenericRandomEarlyDetection]
2670+ ${ attrsToSection def . genericRandomEarlyDetectionConfig }
2671+ ''
26422672 + def . extraConfig ;
26432673 } ;
26442674
0 commit comments