From 01819a7f72fff8a958b32752faa3606caa4f55df Mon Sep 17 00:00:00 2001 From: Marina Maslova Date: Mon, 26 Dec 2022 13:11:44 +0300 Subject: [PATCH] qos: enable should be 1 by default --- qosmngr/files/airoha/lib/qos/common/classify.sh | 4 ++-- qosmngr/files/airoha/lib/qos/common/policer.sh | 4 ++-- qosmngr/files/airoha/lib/qos/common/queue.sh | 4 ++-- qosmngr/files/airoha/lib/qos/common/shaper.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qosmngr/files/airoha/lib/qos/common/classify.sh b/qosmngr/files/airoha/lib/qos/common/classify.sh index 3b4a1d3e3..dcc060dee 100755 --- a/qosmngr/files/airoha/lib/qos/common/classify.sh +++ b/qosmngr/files/airoha/lib/qos/common/classify.sh @@ -5,9 +5,9 @@ handle_classify() { cid="$1" #classify section ID - config_get is_enable "$cid" "enable" + config_get is_enable "$cid" "enable" 1 # no need to configure disabled classify rules - if [ -z "$is_enable" ] || [ "$is_enable" == "0" ]; then + if [ "$is_enable" == "0" ]; then return fi diff --git a/qosmngr/files/airoha/lib/qos/common/policer.sh b/qosmngr/files/airoha/lib/qos/common/policer.sh index d62891e61..c35b670f1 100755 --- a/qosmngr/files/airoha/lib/qos/common/policer.sh +++ b/qosmngr/files/airoha/lib/qos/common/policer.sh @@ -80,10 +80,10 @@ handle_policer() { local p_sec="$1" # policer section ID local dir=1 # default direction, upstream - config_get is_enable "$p_sec" "enable" + config_get is_enable "$p_sec" "enable" 1 # No need to configure disabled policer - if [ -z "$is_enable" ] || [ "$is_enable" == "0" ] ; then + if [ "$is_enable" == "0" ] ; then return fi diff --git a/qosmngr/files/airoha/lib/qos/common/queue.sh b/qosmngr/files/airoha/lib/qos/common/queue.sh index b765e23c9..9cd5f54ea 100755 --- a/qosmngr/files/airoha/lib/qos/common/queue.sh +++ b/qosmngr/files/airoha/lib/qos/common/queue.sh @@ -18,10 +18,10 @@ handle_queue() { local qid="$1" #queue section ID local intf_name="$2" - config_get is_enable "$qid" "enable" + config_get is_enable "$qid" "enable" 1 # no need to configure disabled queues - if [ -z "${is_enable}" ] || [ "${is_enable}" == "0" ]; then + if [ "${is_enable}" == "0" ]; then return fi diff --git a/qosmngr/files/airoha/lib/qos/common/shaper.sh b/qosmngr/files/airoha/lib/qos/common/shaper.sh index cf2d8b789..a8eacd13d 100755 --- a/qosmngr/files/airoha/lib/qos/common/shaper.sh +++ b/qosmngr/files/airoha/lib/qos/common/shaper.sh @@ -7,9 +7,9 @@ handle_shaper() { sid="$1" #queue section ID - config_get is_enable "$sid" "enable" + config_get is_enable "$sid" "enable" 1 # no need to configure disabled queues - if [ -z "${is_enable}" ] || [ "${is_enable}" == "0" ] ; then + if [ "${is_enable}" == "0" ] ; then return fi