target/realtek: speed up pppoe
This commit is contained in:
parent
a5f732af6b
commit
3a2815371c
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
[ "$ACTION" = add ] || [ "$ACTION" = remove -a "$DEVTYPE" = ppp ] || exit
|
||||
|
||||
NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)"
|
||||
[ "$NPROCS" -eq 4 ] || exit
|
||||
|
||||
grep -Fq rtd-1296 /proc/device-tree/compatible || exit
|
||||
|
||||
cd /sys/class/net || exit
|
||||
|
||||
[ -e eth0 -a -e eth1 ] || exit
|
||||
|
||||
exec 512>/var/lock/smp_tune.lock
|
||||
flock 512 || exit 1
|
||||
|
||||
PROTO=`uci get network.wan.proto`
|
||||
logger -t 'rtd129x-packet-steering' "current proto $PROTO"
|
||||
if echo " none static dhcp dhcpv6 " | grep -Fq " $PROTO "; then
|
||||
[ "`cat eth0/queues/rx-0/rps_cpus`" = "0" ] && exit
|
||||
echo 0 > eth1/queues/rx-0/rps_cpus
|
||||
echo 0 > eth1/queues/tx-0/xps_cpus
|
||||
echo 0 > eth0/queues/rx-0/rps_cpus
|
||||
echo 0 > eth0/queues/tx-0/xps_cpus
|
||||
else
|
||||
[ "`cat eth0/queues/rx-0/rps_cpus`" = "a" ] && exit
|
||||
echo a > eth1/queues/rx-0/rps_cpus
|
||||
echo 5 > eth1/queues/tx-0/xps_cpus
|
||||
echo a > eth0/queues/rx-0/rps_cpus
|
||||
echo 5 > eth0/queues/tx-0/xps_cpus
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user