iopsys-feed/qosmngr/files/airoha/lib/qos/qos.sh
2023-01-18 06:16:29 +00:00

56 lines
1.2 KiB
Bash
Executable file

#!/bin/sh
# The entrypoint for the QoS setup library
. /lib/functions.sh
include /lib/ethernet
. /lib/qos/common/chains.sh
. /lib/qos/common/chains.ebtables.sh
. /lib/qos/common/chains.iptables.sh
. /lib/qos/common/classify.sh
. /lib/qos/common/policer.sh
. /lib/qos/common/queue.sh
. /lib/qos/common/shaper.sh
. /lib/qos/airoha.sh
. /lib/qos/ip_rule.sh
configure_qos() {
# queue configuration is being done after shaper configuration,
# If port shapingrate configuration on DISC device is called after queue configuration then
# driver overwrites the queue shaping rate with default value of port shaping rate.
pre_configure_queue
setup_qos
configure_shaper
configure_queue
configure_policer
configure_classify
}
reload_qos() {
local service_name="$1"
hw_init_all
case "${service_name}" in
shaper)
configure_shaper
;;
queue)
pre_configure_queue
configure_queue
;;
classify)
configure_classify
;;
policer)
configure_policer
;;
"")
configure_qos
;;
esac
hw_commit_all
}
reload_qos_service() {
reload_qos
}