mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
qosmngr: corrected portid and unit for rxratecrtl
This commit is contained in:
parent
ae621822c4
commit
af241bb222
1 changed files with 12 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
. /lib/network/port.sh
|
||||
|
||||
IP_RULE=""
|
||||
BR_RULE=""
|
||||
|
|
@ -13,6 +14,7 @@ PREV_ORDER=""
|
|||
CURR_ORDER=""
|
||||
MAX_ORDER=""
|
||||
|
||||
|
||||
# Function to handle a queue order and
|
||||
# update total number of queues
|
||||
handle_q_order() {
|
||||
|
|
@ -763,7 +765,10 @@ config_ingress_rate_limit() {
|
|||
in_burst_size=$((in_burst_size / 1000))
|
||||
fi
|
||||
|
||||
ethswctl -c rxratectrl -n 1 -p $ifname -x $ingress_rate -y $in_burst_size
|
||||
local unitport="$(get_port_number $ifname)"
|
||||
local unit=$(echo $unitport | cut -d ' ' -f 1)
|
||||
local port=$(echo $unitport | cut -d ' ' -f 2)
|
||||
ethswctl -c rxratectrl -n $unit -p $port -x $ingress_rate -y $in_burst_size
|
||||
}
|
||||
|
||||
#function to handle a classify section
|
||||
|
|
@ -854,10 +859,14 @@ configure_policer() {
|
|||
# the old config if any and return
|
||||
if [ $POLICER_SKIP -eq 0 ]; then
|
||||
for intf in $(db get hw.board.ethernetPortOrder); do
|
||||
local unitport="$(get_port_number $intf)"
|
||||
local unit=$(echo $unitport | cut -d ' ' -f 1)
|
||||
local port=$(echo $unitport | cut -d ' ' -f 2)
|
||||
# setting rate and burst size to 0 disables rate limiting
|
||||
ethswctl -c rxratectrl -n 1 -p $intf -x 0 -y 0
|
||||
if [ $port != "" -a $unit != "" ]; then
|
||||
ethswctl -c rxratectrl -n $unit -p $intf -x 0 -y 0
|
||||
fi
|
||||
done
|
||||
return
|
||||
fi
|
||||
|
||||
# Delete policer
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue