mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
qosmngr: airoha: Fix QoS issue with EN7523+IFC.
When the LUT1 IFC table overflows it seems to affect tagged TCP-based VLAN traffic and ingress flows are not properly setup in HW NAT.
This commit is contained in:
parent
8fee332f4c
commit
ce1b42e095
1 changed files with 35 additions and 26 deletions
|
|
@ -411,33 +411,42 @@ hw_commit_all() {
|
|||
/userfs/bin/qosrule discpline Enable 0
|
||||
fi
|
||||
|
||||
if [ -x /userfs/bin/blapi_cmd ]; then
|
||||
echo 1 > /proc/ifc_send_to_ppe
|
||||
for tc in $(seq 0 7); do
|
||||
if [ -s "/tmp/qos/dscp_values_${tc}_4" ]; then
|
||||
sort -un "/tmp/qos/dscp_values_${tc}_4" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
|
||||
fi
|
||||
if [ -s "/tmp/qos/dscp_values_${tc}_6" ]; then
|
||||
[ -s "/tmp/qos/dscp_values_${tc}_4" ] && sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0")}'
|
||||
sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if ! strings /proc/device-tree/compatible | grep -qFx econet,en7523; then
|
||||
if [ -x /userfs/bin/blapi_cmd ]; then
|
||||
echo 1 > /proc/ifc_send_to_ppe
|
||||
for tc in $(seq 0 7); do
|
||||
if [ -s "/tmp/qos/dscp_values_${tc}_4" ]; then
|
||||
sort -un "/tmp/qos/dscp_values_${tc}_4" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
|
||||
fi
|
||||
if [ -s "/tmp/qos/dscp_values_${tc}_6" ]; then
|
||||
[ -s "/tmp/qos/dscp_values_${tc}_4" ] && sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0")}'
|
||||
sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
|
||||
$1 == last+1 {last=$1;next}
|
||||
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
|
||||
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -x /userfs/bin/ifc ]; then
|
||||
echo 1 > /proc/ifc_send_to_ppe
|
||||
for pbit in $(seq 0 7); do
|
||||
/userfs/bin/ifc add vip pbit $pbit
|
||||
done
|
||||
if [ -x /userfs/bin/ifc ]; then
|
||||
echo 1 > /proc/ifc_send_to_ppe
|
||||
for pbit in $(seq 0 7); do
|
||||
/userfs/bin/ifc add vip pbit $pbit
|
||||
done
|
||||
fi
|
||||
else
|
||||
if [ -x /userfs/bin/ifc ]; then
|
||||
echo 1 > /proc/ifc_send_to_ppe
|
||||
for pbit in $(seq 1 7); do
|
||||
/userfs/bin/ifc add vip pbit $pbit
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
hw_nat -! > /dev/null 2>&1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue