From 35b45c40453ab49f5c092a03dd0938fd43b08a54 Mon Sep 17 00:00:00 2001 From: Rahul Thakur Date: Wed, 24 Jan 2024 15:50:34 +0530 Subject: [PATCH] qosmngr: fix qcm default config different from other targets In the default qos config on qcm, the burst size is 1500 while on other targets its 0, this is incorrect since iowrt uci defaults should be consistent across targets; fixed with this commit. --- qosmngr/files/airoha/lib/qos/qos.sh | 4 ---- qosmngr/files/broadcom/lib/qos/qos.sh | 4 ---- .../files/common/etc/uci-defaults/60-qos_config_generate | 2 +- qosmngr/files/linux/lib/qos/qos.sh | 7 ++----- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/qosmngr/files/airoha/lib/qos/qos.sh b/qosmngr/files/airoha/lib/qos/qos.sh index bc4a6f0c0..80f0221fa 100755 --- a/qosmngr/files/airoha/lib/qos/qos.sh +++ b/qosmngr/files/airoha/lib/qos/qos.sh @@ -15,10 +15,6 @@ include /lib/ethernet . /lib/qos/shaper.sh . /lib/qos/airoha.sh -get_burst_size_per_queue() { - echo "0" -} - # marking value be decimal for linux target as it uses set-mark whereas other # targets uses set-xmark, hence this function can't make it common ip_rule_get_converted_tos() { diff --git a/qosmngr/files/broadcom/lib/qos/qos.sh b/qosmngr/files/broadcom/lib/qos/qos.sh index dd61f6609..7d13d4299 100755 --- a/qosmngr/files/broadcom/lib/qos/qos.sh +++ b/qosmngr/files/broadcom/lib/qos/qos.sh @@ -34,10 +34,6 @@ get_port_number() { done } -get_burst_size_per_queue() { - echo "0" -} - # Function to handle a queue order and # update total number of queues handle_q_order() { diff --git a/qosmngr/files/common/etc/uci-defaults/60-qos_config_generate b/qosmngr/files/common/etc/uci-defaults/60-qos_config_generate index d969bbff6..d8446e651 100644 --- a/qosmngr/files/common/etc/uci-defaults/60-qos_config_generate +++ b/qosmngr/files/common/etc/uci-defaults/60-qos_config_generate @@ -32,7 +32,7 @@ generate_queue(){ uci set qos.@queue[-1].precedence="$order" uci set qos.@queue[-1].scheduling="SP" uci set qos.@queue[-1].rate="0" - uci set qos.@queue[-1].burst_size=$(get_burst_size_per_queue) + uci set qos.@queue[-1].burst_size="0" uci set qos.@queue[-1].weight="1" done diff --git a/qosmngr/files/linux/lib/qos/qos.sh b/qosmngr/files/linux/lib/qos/qos.sh index a9f049505..21d42f694 100755 --- a/qosmngr/files/linux/lib/qos/qos.sh +++ b/qosmngr/files/linux/lib/qos/qos.sh @@ -15,10 +15,6 @@ Q_COUNT=0 SP_Q_PRIO=7 SOQ_wgt=0 -get_burst_size_per_queue() { - echo "1500" -} - get_max_burst_size_per_queue() { # maximum burst size for tc class echo "4289999999" @@ -137,10 +133,11 @@ handle_queue() { config_get sc_alg "$qid" "scheduling" config_get wgt "$qid" "weight" 1 config_get rate "$qid" "rate" - config_get bs "$qid" "burst_size" + config_get bs "$qid" "burst_size" 1500 config_get qsize "$qid" "queue_size" 1024 [ "$rate" == "0" ] && rate="$port_bw" + [ "$bs" == "0" ] && bs=1500 bs=$(( bs * 8 )) rate_bs=$(( rate * 25 ))