qosmngr: Improvements on qcm shaper

This commit is contained in:
subramanianc 2023-11-07 09:19:23 +05:30 committed by Rahul Thakur
parent 12dff011cc
commit 0969cc7a24

View file

@ -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