@@ -1197,6 +1197,15 @@ func parseTuneOptions(p parser.Parser) (*models.TuneOptions, error) { //nolint:g
1197
1197
options .CompMaxlevel = intOption
1198
1198
}
1199
1199
1200
+ boolOption , err = parseBoolOption (p , "tune.disable-fast-forward" )
1201
+ if err != nil {
1202
+ return nil , err
1203
+ }
1204
+ if boolOption {
1205
+ isEmpty = false
1206
+ options .DisableFastForward = boolOption
1207
+ }
1208
+
1200
1209
boolOption , err = parseBoolOption (p , "tune.disable-zero-copy-forwarding" )
1201
1210
if err != nil {
1202
1211
return nil , err
@@ -1494,6 +1503,15 @@ func parseTuneOptions(p parser.Parser) (*models.TuneOptions, error) { //nolint:g
1494
1503
options .H2BeMaxConcurrentStreams = intOption
1495
1504
}
1496
1505
1506
+ intPOption , err = parseSizeOption (p , "tune.h2.be.rxbuf" )
1507
+ if err != nil {
1508
+ return nil , err
1509
+ }
1510
+ if intPOption != nil {
1511
+ isEmpty = false
1512
+ options .H2BeRxbuf = intPOption
1513
+ }
1514
+
1497
1515
intPOption , err = parseInt64POption (p , "tune.h2.fe.glitches-threshold" )
1498
1516
if err != nil {
1499
1517
return nil , err
@@ -1530,6 +1548,15 @@ func parseTuneOptions(p parser.Parser) (*models.TuneOptions, error) { //nolint:g
1530
1548
options .H2FeMaxTotalStreams = intPOption
1531
1549
}
1532
1550
1551
+ intPOption , err = parseSizeOption (p , "tune.h2.fe.rxbuf" )
1552
+ if err != nil {
1553
+ return nil , err
1554
+ }
1555
+ if intPOption != nil {
1556
+ isEmpty = false
1557
+ options .H2FeRxbuf = intPOption
1558
+ }
1559
+
1533
1560
strOption , err = parseOnOffOption (p , "tune.h2.zero-copy-fwd-send" )
1534
1561
if err != nil {
1535
1562
return nil , err
@@ -1548,6 +1575,24 @@ func parseTuneOptions(p parser.Parser) (*models.TuneOptions, error) { //nolint:g
1548
1575
options .PtZeroCopyForwarding = strOption
1549
1576
}
1550
1577
1578
+ intPOption , err = parseInt64POption (p , "tune.renice.runtime" )
1579
+ if err != nil {
1580
+ return nil , err
1581
+ }
1582
+ if intPOption != nil {
1583
+ isEmpty = false
1584
+ options .ReniceRuntime = intPOption
1585
+ }
1586
+
1587
+ intPOption , err = parseInt64POption (p , "tune.renice.startup" )
1588
+ if err != nil {
1589
+ return nil , err
1590
+ }
1591
+ if intPOption != nil {
1592
+ isEmpty = false
1593
+ options .ReniceStartup = intPOption
1594
+ }
1595
+
1551
1596
if isEmpty {
1552
1597
return nil , nil //nolint:nilnil
1553
1598
}
@@ -1585,6 +1630,15 @@ func parseTuneBufferOptions(p parser.Parser) (*models.TuneBufferOptions, error)
1585
1630
options .Bufsize = intOption
1586
1631
}
1587
1632
1633
+ intPOption , err = parseSizeOption (p , "tune.bufsize.small" )
1634
+ if err != nil {
1635
+ return nil , err
1636
+ }
1637
+ if intPOption != nil {
1638
+ isEmpty = false
1639
+ options .BufsizeSmall = intPOption
1640
+ }
1641
+
1588
1642
intOption , err = parseInt64Option (p , "tune.pipesize" )
1589
1643
if err != nil {
1590
1644
return nil , err
@@ -2122,6 +2176,12 @@ func ParseGlobalSection(p parser.Parser) (*models.Global, error) { //nolint:goco
2122
2176
}
2123
2177
global .EnvironmentOptions = envOptions
2124
2178
2179
+ exposeDeprecatedDirectives , err := parseBoolOption (p , "expose-deprecated-directives" )
2180
+ if err != nil {
2181
+ return nil , err
2182
+ }
2183
+ global .ExposeDeprecatedDirectives = exposeDeprecatedDirectives
2184
+
2125
2185
exposeExperimentalDirectives , err := parseBoolOption (p , "expose-experimental-directives" )
2126
2186
if err != nil {
2127
2187
return nil , err
@@ -2140,6 +2200,11 @@ func ParseGlobalSection(p parser.Parser) (*models.Global, error) { //nolint:goco
2140
2200
}
2141
2201
global .FiftyOneDegreesOptions = fiftyOneDegreesOptions
2142
2202
2203
+ global .ForceCfgParserPause , err = parseTimeoutOption (p , "force-cfg-parser-pause" )
2204
+ if err != nil {
2205
+ return nil , err
2206
+ }
2207
+
2143
2208
gid , err := parseInt64Option (p , "gid" )
2144
2209
if err != nil {
2145
2210
return nil , err
@@ -2460,6 +2525,11 @@ func ParseGlobalSection(p parser.Parser) (*models.Global, error) { //nolint:goco
2460
2525
}
2461
2526
global .Ulimitn = ulimitn
2462
2527
2528
+ global .WarnBlockedTrafficAfter , err = parseTimeoutOption (p , "warn-blocked-traffic-after" )
2529
+ if err != nil {
2530
+ return nil , err
2531
+ }
2532
+
2463
2533
wurflOptions , err := parseWurflOptions (p )
2464
2534
if err != nil {
2465
2535
return nil , err
@@ -2995,6 +3065,10 @@ func SerializeGlobalSection(p parser.Parser, data *models.Global, opt *options.C
2995
3065
return err
2996
3066
}
2997
3067
3068
+ if err := serializeBoolOption (p , "expose-deprecated-directives" , data .ExposeDeprecatedDirectives ); err != nil {
3069
+ return err
3070
+ }
3071
+
2998
3072
if err := serializeBoolOption (p , "expose-experimental-directives" , data .ExposeExperimentalDirectives ); err != nil {
2999
3073
return err
3000
3074
}
@@ -3007,6 +3081,10 @@ func SerializeGlobalSection(p parser.Parser, data *models.Global, opt *options.C
3007
3081
return err
3008
3082
}
3009
3083
3084
+ if err := serializeTimeoutOption (p , "force-cfg-parser-pause" , data .ForceCfgParserPause , opt ); err != nil {
3085
+ return err
3086
+ }
3087
+
3010
3088
if err := serializeInt64Option (p , "gid" , data .Gid ); err != nil {
3011
3089
return err
3012
3090
}
@@ -3233,6 +3311,10 @@ func SerializeGlobalSection(p parser.Parser, data *models.Global, opt *options.C
3233
3311
return err
3234
3312
}
3235
3313
3314
+ if err := serializeTimeoutOption (p , "warn-blocked-traffic-after" , data .WarnBlockedTrafficAfter , opt ); err != nil {
3315
+ return err
3316
+ }
3317
+
3236
3318
return serializeWurflOptions (p , data .WurflOptions )
3237
3319
}
3238
3320
@@ -3337,6 +3419,9 @@ func serializeTuneBufferOptions(p parser.Parser, options *models.TuneBufferOptio
3337
3419
if err := serializeInt64Option (p , "tune.bufsize" , options .Bufsize ); err != nil {
3338
3420
return err
3339
3421
}
3422
+ if err := serializeSizeOption (p , "tune.bufsize.small" , options .BufsizeSmall ); err != nil {
3423
+ return err
3424
+ }
3340
3425
if err := serializeInt64Option (p , "tune.pipesize" , options .Pipesize ); err != nil {
3341
3426
return err
3342
3427
}
@@ -3490,7 +3575,7 @@ func serializeTuneZlibOptions(p parser.Parser, options *models.TuneZlibOptions)
3490
3575
return serializeInt64Option (p , "tune.zlib.windowsize" , options .Windowsize )
3491
3576
}
3492
3577
3493
- func serializeTuneOptions (p parser.Parser , options * models.TuneOptions , configOptions * options.ConfigurationOptions ) error { //nolint:gocognit
3578
+ func serializeTuneOptions (p parser.Parser , options * models.TuneOptions , configOptions * options.ConfigurationOptions ) error { //nolint:gocognit,gocyclo,cyclop
3494
3579
if options == nil {
3495
3580
options = & models.TuneOptions {}
3496
3581
}
@@ -3500,6 +3585,9 @@ func serializeTuneOptions(p parser.Parser, options *models.TuneOptions, configOp
3500
3585
if err := serializeInt64Option (p , "tune.comp.maxlevel" , options .CompMaxlevel ); err != nil {
3501
3586
return err
3502
3587
}
3588
+ if err := serializeBoolOption (p , "tune.disable-fast-forward" , options .DisableFastForward ); err != nil {
3589
+ return err
3590
+ }
3503
3591
if err := serializeBoolOption (p , "tune.disable-zero-copy-forwarding" , options .DisableZeroCopyForwarding ); err != nil {
3504
3592
return err
3505
3593
}
@@ -3599,6 +3687,9 @@ func serializeTuneOptions(p parser.Parser, options *models.TuneOptions, configOp
3599
3687
if err := serializeInt64Option (p , "tune.h2.be.max-concurrent-streams" , options .H2BeMaxConcurrentStreams ); err != nil {
3600
3688
return err
3601
3689
}
3690
+ if err := serializeSizeOption (p , "tune.h2.be.rxbuf" , options .H2BeRxbuf ); err != nil {
3691
+ return err
3692
+ }
3602
3693
if err := serializeInt64POption (p , "tune.h2.fe.glitches-threshold" , options .H2FeGlitchesThreshold ); err != nil {
3603
3694
return err
3604
3695
}
@@ -3611,10 +3702,22 @@ func serializeTuneOptions(p parser.Parser, options *models.TuneOptions, configOp
3611
3702
if err := serializeInt64POption (p , "tune.h2.fe.max-total-streams" , options .H2FeMaxTotalStreams ); err != nil {
3612
3703
return err
3613
3704
}
3705
+ if err := serializeSizeOption (p , "tune.h2.fe.rxbuf" , options .H2FeRxbuf ); err != nil {
3706
+ return err
3707
+ }
3614
3708
if err := serializeOnOffOption (p , "tune.h2.zero-copy-fwd-send" , options .H2ZeroCopyFwdSend ); err != nil {
3615
3709
return err
3616
3710
}
3617
- return serializeOnOffOption (p , "tune.pt.zero-copy-forwarding" , options .PtZeroCopyForwarding )
3711
+ if err := serializeOnOffOption (p , "tune.pt.zero-copy-forwarding" , options .PtZeroCopyForwarding ); err != nil {
3712
+ return err
3713
+ }
3714
+ if err := serializeInt64POption (p , "tune.renice.runtime" , options .ReniceRuntime ); err != nil {
3715
+ return err
3716
+ }
3717
+ if err := serializeInt64POption (p , "tune.renice.startup" , options .ReniceStartup ); err != nil {
3718
+ return err
3719
+ }
3720
+ return nil
3618
3721
}
3619
3722
3620
3723
func serializeTimeoutOption (p parser.Parser , option string , data * int64 , opt * options.ConfigurationOptions ) error {
0 commit comments