From 0969cc7a2429dd729a5fbaf88e6b5708c33712c3 Mon Sep 17 00:00:00 2001 From: subramanianc Date: Tue, 7 Nov 2023 09:19:23 +0530 Subject: [PATCH] qosmngr: Improvements on qcm shaper --- qosmngr/files/linux/lib/qos/qos.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qosmngr/files/linux/lib/qos/qos.sh b/qosmngr/files/linux/lib/qos/qos.sh index df838d0ab..1b3acf8ab 100755 --- a/qosmngr/files/linux/lib/qos/qos.sh +++ b/qosmngr/files/linux/lib/qos/qos.sh @@ -23,6 +23,11 @@ get_burst_size_per_queue() { echo "1500" } +get_max_burst_size_per_queue() { + # maximum burst size for tc class + echo "4289999999" +} + handle_q_weight() { local qid="$1" #queue section ID config_get ifname "$qid" "ifname" @@ -99,6 +104,8 @@ handle_queue() { local port_bs="$5" local par_class="$6" local priority=7 + local bs=0 + config_get is_enable "$qid" "enable" # no need to configure disabled queues @@ -146,6 +153,10 @@ handle_queue() { fi # burst size in tc class is given in bytes bs=$(( bs * 1000 )) + local max_bs=$(get_max_burst_size_per_queue ) + if [ $bs -gt $max_bs ]; then + bs=$max_bs + fi local salg=1 @@ -160,7 +171,9 @@ handle_queue() { ;; esac - priority=`expr $priority - $order` + if [ $salg -ne 2 ]; then + priority=`expr $priority - $order` + fi local ceil_rate=$port_bw if [ "$rate" -lt "$port_bw" ]; then