[][Kernel][mt7988][eth][Refine QDMA queue & scheduler mapping]
[Description]
Add configurations to refine QDMA queue & scheduler mapping.
At cheetah project, we've found a software path performance
bound issue before, which is solved by adopting QDMA multi-sch.
=> https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwr
t_feeds/+/5457061
It's confirmed that the issue only happens at NETSYS V2,
so this patch makes sure the solution is dedicatedly applied
on Panther and Cheetah.
If without this patch, NETSYS V3 software path might show
abnormal behavior.
[Release-log]
N/A
Change-Id: I735a22ffca3c191a84fa19a86487e695b6797983
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7023395
diff --git a/feed/mtkhnat_util/files/mtkhnat b/feed/mtkhnat_util/files/mtkhnat
index f70049a..f407f1a 100755
--- a/feed/mtkhnat_util/files/mtkhnat
+++ b/feed/mtkhnat_util/files/mtkhnat
@@ -44,12 +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)
+
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)) ]; then
+ if [ "${i}" -le $(((txq_num / 2) - 1)) ] || [ ! $IS_NETSYS_V2 ]; 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