qosmngr: Fix ingress rate limiting on Broadcom.

The code for ingress rate limiting is not working
on Broadcom.
This commit is contained in:
Markus Gothe 2023-09-18 16:13:40 +02:00
parent be22778704
commit 05448a3cae

View file

@ -15,6 +15,25 @@ SP_Q_PRIO=7
cfg_name=""
cfg_type=""
get_port_number() {
[ -z "$1" ] && return
local ports="0 1 2 3 4 5 6 7 8"
local units="0 1"
local port="$1"
local prt
local ifname
for unit in $units; do
for prt in $ports; do
ifname="$(ethswctl getifname $unit $prt 2>/dev/null | awk '{print$NF}')"
if [ "$ifname" == "$port" ]; then
echo "$unit $prt"
return
fi
done
done
}
get_rate_per_queue() {
echo "0"
}