Skip to content

Commit 2e089ff

Browse files
authored
Fix qos not work (#6231)
* fix(qos): fix NAT Gateway QoS not working * fix eip deletion not trigger qos again This PR fixes multiple issues with NAT Gateway QoS functionality: 1. Fix matchall filter handle extraction regex - matchall filter uses 'handle 0xNNNN' format, not 'fh' like u32 filters - Changed regex from 'fh [0-9a-f:]+' to 'handle 0x[0-9a-fA-F]+' 2. Fix matchall filter line extraction when u32 filters exist - When both u32 and matchall filters exist, 'grep -B2 matchall' captured wrong lines - Use 'grep matchall.*flowid' to directly match the correct line 3. Use IFB + HTB instead of police for ingress QoS - police drops packets exceeding rate limit (unfriendly to TCP) - HTB queues packets and applies backpressure, allowing TCP to adapt smoothly - This results in actual throughput close to the configured rate limit 4. Support decimal values for rateMax/burstMax (e.g., 1.5 Mbit/s) - Convert burst from MB to bytes to avoid tc parsing issues 5. Add detailed parameter documentation for all QoS functions - qos_add: 9 parameters - qos_del: 7 parameters - eip_*_qos_add: 4 parameters - eip_*_qos_del: 1 parameter 6. Add DEBUG switch for QoS troubleshooting --------- Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
1 parent fb80618 commit 2e089ff

File tree

10 files changed

+2481
-343
lines changed

10 files changed

+2481
-343
lines changed

charts/kube-ovn-v2/crds/kube-ovn-crd.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3583,10 +3583,12 @@ spec:
35833583
description: Interface name
35843584
rateMax:
35853585
type: string
3586-
description: Maximum rate (e.g., 100Mbps)
3586+
pattern: '^[0-9]+(\.[0-9]+)?$'
3587+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
35873588
burstMax:
35883589
type: string
3589-
description: Maximum burst rate
3590+
pattern: '^[0-9]+(\.[0-9]+)?$'
3591+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
35903592
priority:
35913593
type: integer
35923594
description: Rule priority
@@ -3646,10 +3648,12 @@ spec:
36463648
description: Network interface to apply the rule
36473649
rateMax:
36483650
type: string
3649-
description: Maximum rate (e.g., 100Mbps, 1Gbps)
3651+
pattern: '^[0-9]+(\.[0-9]+)?$'
3652+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
36503653
burstMax:
36513654
type: string
3652-
description: Maximum burst rate
3655+
pattern: '^[0-9]+(\.[0-9]+)?$'
3656+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
36533657
priority:
36543658
type: integer
36553659
description: Rule priority for ordering

charts/kube-ovn/templates/kube-ovn-crd.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,10 +3627,12 @@ spec:
36273627
description: Interface name
36283628
rateMax:
36293629
type: string
3630-
description: Maximum rate (e.g., 100Mbps)
3630+
pattern: '^[0-9]+(\.[0-9]+)?$'
3631+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
36313632
burstMax:
36323633
type: string
3633-
description: Maximum burst rate
3634+
pattern: '^[0-9]+(\.[0-9]+)?$'
3635+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
36343636
priority:
36353637
type: integer
36363638
description: Rule priority
@@ -3690,10 +3692,12 @@ spec:
36903692
description: Network interface to apply the rule
36913693
rateMax:
36923694
type: string
3693-
description: Maximum rate (e.g., 100Mbps, 1Gbps)
3695+
pattern: '^[0-9]+(\.[0-9]+)?$'
3696+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
36943697
burstMax:
36953698
type: string
3696-
description: Maximum burst rate
3699+
pattern: '^[0-9]+(\.[0-9]+)?$'
3700+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
36973701
priority:
36983702
type: integer
36993703
description: Rule priority for ordering

dist/images/install.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,10 +3877,12 @@ spec:
38773877
description: Interface name
38783878
rateMax:
38793879
type: string
3880-
description: Maximum rate (e.g., 100Mbps)
3880+
pattern: '^[0-9]+(\.[0-9]+)?$'
3881+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
38813882
burstMax:
38823883
type: string
3883-
description: Maximum burst rate
3884+
pattern: '^[0-9]+(\.[0-9]+)?$'
3885+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
38843886
priority:
38853887
type: integer
38863888
description: Rule priority
@@ -3940,10 +3942,12 @@ spec:
39403942
description: Network interface to apply the rule
39413943
rateMax:
39423944
type: string
3943-
description: Maximum rate (e.g., 100Mbps, 1Gbps)
3945+
pattern: '^[0-9]+(\.[0-9]+)?$'
3946+
description: Maximum rate in Mbps (e.g., 100 or 0.5 for 500Kbps)
39443947
burstMax:
39453948
type: string
3946-
description: Maximum burst rate
3949+
pattern: '^[0-9]+(\.[0-9]+)?$'
3950+
description: Maximum burst in MB (e.g., 10 or 0.5 for 500KB)
39473951
priority:
39483952
type: integer
39493953
description: Rule priority for ordering

0 commit comments

Comments
 (0)