[][kernel][mt7986][eth][Change QDMA queue and scheduler mapping]
[Description]
Change QDMA queue and scheduler mapping.
We found a performance bound issue.
If QDMA TX queue0 and TX queue8 are mapped to different schedulers,
it will cause low bi-direction throughput.
If without this patch, Panther 1G LAN <-> 2.5G WAN
bi-direction throughput can only reach 1Gbps.
[Release-log]
N/A
Change-Id: Ic701a32308cd49ed3b1028834c3051ffe5d55f45
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8057749
diff --git a/feed/mtkhnat_util/files/mtkhnat b/feed/mtkhnat_util/files/mtkhnat
index f407f1a..53e444b 100755
--- a/feed/mtkhnat_util/files/mtkhnat
+++ b/feed/mtkhnat_util/files/mtkhnat
@@ -44,15 +44,15 @@
#if hqos=0, disable qdma_sch & qdma_txq
[ "${hqos}" -eq 1 ] || {
- SOC=`cat /proc/device-tree/ethernet*/compatible | cut -c 10-15`
- IS_NETSYS_V2=$(if [[ $SOC == "mt7986" || $SOC == "mt7981" ]]; then echo true; fi)
+ SOC=`cat /proc/device-tree/ethernet*/compatible | cut -c 10-15`
+ DUAL_SCH=$(if [ $SOC = "mt7981" ]; then echo true; fi)
echo 0 ${scheduling} ${sch0_bw} > /sys/kernel/debug/${module}/qdma_sch0
echo 0 ${scheduling} ${sch1_bw} > /sys/kernel/debug/${module}/qdma_sch1
for i in $(seq 0 $((txq_num - 1)))
do
- if [ "${i}" -le $(((txq_num / 2) - 1)) ] || [ ! $IS_NETSYS_V2 ]; then
+ if [ "${i}" -le $(((txq_num / 2) - 1)) ] || [ ! $DUAL_SCH ]; then
echo 0 0 0 0 0 0 4 > /sys/kernel/debug/${module}/qdma_txq$i
else
echo 1 0 0 0 0 0 4 > /sys/kernel/debug/${module}/qdma_txq$i