hanwckf / immortalwrt-mt798x

An Immortalwrt variant for mediatek mt798x routers.
Other
1.12k stars 594 forks source link

hqos限速优先级是不是有问题? #261

Open w22gb8 opened 8 months ago

w22gb8 commented 8 months ago

Describe the bug

宽带1000下100上,在上传跑到45m或下载跑到95m的时候在另一台机器上ping公网丢包和延时很高,是我配置有问题吗?

#!/bin/bash
echo 0 > /sys/kernel/debug/hnat/qos_toggle
echo 0 > /sys/kernel/debug/hnat/hook_toggle
for i in $(seq 0 63); do
  echo '0 0 0 0 0 0 0' > /sys/kernel/debug/hnat/qdma_txq$i 2> /dev/null
done
for i in $(seq 0 3); do
  echo '0 sp 0' > /sys/kernel/debug/hnat/qdma_sch$i 2> /dev/null
done

echo '0 sp 10000000' > /sys/kernel/debug/hnat/qdma_sch0 2> /dev/null
echo '0 sp 10000000' > /sys/kernel/debug/hnat/qdma_sch1 2> /dev/null
echo '1 sp 100000'   > /sys/kernel/debug/hnat/qdma_sch2 2> /dev/null
echo '1 sp 1000000'  > /sys/kernel/debug/hnat/qdma_sch3 2> /dev/null

echo '0 0 0 0 0 0 0' > /sys/kernel/debug/hnat/qdma_txq0 2> /dev/null
echo '0 0 0 0 0 0 0' > /sys/kernel/debug/hnat/qdma_txq32 2> /dev/null
echo '2 1 10000 1 50000 1 4' > /sys/kernel/debug/hnat/qdma_txq1 2> /dev/null
echo '2 1 10000 1 50000 2 4' > /sys/kernel/debug/hnat/qdma_txq2 2> /dev/null

echo '3 1 10000 1 100000 1 4' > /sys/kernel/debug/hnat/qdma_txq9 2> /dev/null
echo '3 1 10000 1 100000 2 4' > /sys/kernel/debug/hnat/qdma_txq10 2> /dev/null

iptables -t mangle -I FORWARD -j MARK --set-mark 0
ip6tables -t mangle -I FORWARD -j MARK --set-mark 0
iptables -t mangle -I OUTPUT -j MARK --set-mark 0
ip6tables -t mangle -I OUTPUT -j MARK --set-mark 0
iptables -t mangle -A FORWARD -o pppoe-wan -j MARK --set-mark 1
ip6tables -t mangle -A FORWARD -o pppoe-wan -j MARK --set-mark 1
iptables -t mangle -A FORWARD -o pppoe-wan -p icmpv6 -j MARK --set-mark 2

iptables -t mangle -A FORWARD -i pppoe-wan -j MARK --set-mark 9
ip6tables -t mangle -A FORWARD -i pppoe-wan -j MARK --set-mark 9
iptables -t mangle -A FORWARD -i pppoe-wan -p icmp -j MARK --set-mark 10
echo 1 > /sys/kernel/debug/hnat/qos_toggle
echo 1 > /sys/kernel/debug/hnat/hook_toggle
echo "10 0" > /sys/kernel/debug/hnat/hnat_setting
echo "11 5" >/sys/kernel/debug/hnat/hnat_setting

ImmortalWrt version

21.02-SNAPSHOT

ImmortalWrt target/subtarget

r0-24546fd

Device

redmi ax6000

Image kind

Self-built image

Steps to reproduce

No response

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

DieJob commented 3 months ago

请教一下,这两句是什么意思? echo "10 0" > /sys/kernel/debug/hnat/hnat_setting echo "11 5" >/sys/kernel/debug/hnat/hnat_setting

或者能否告知hnat_setting的设置参数?谢谢

w22gb8 commented 3 months ago

请教一下,这两句是什么意思? echo "10 0" > /sys/kernel/debug/hnat/hnat_setting echo "11 5" >/sys/kernel/debug/hnat/hnat_setting

或者能否告知hnat_setting的设置参数?谢谢

https://github.com/hanwckf/immortalwrt-mt798x/blob/ab766cbcb0cc22a64e8bf816443bf3e1a56614bd/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_debugfs.c#L576