diff --git a/target/linux/mediatek/base-files/etc/hotplug.d/iface/30-ext-devices-rps-setting b/target/linux/mediatek/base-files/etc/hotplug.d/iface/30-ext-devices-rps-setting index 494552c664..24fe26ee24 100755 --- a/target/linux/mediatek/base-files/etc/hotplug.d/iface/30-ext-devices-rps-setting +++ b/target/linux/mediatek/base-files/etc/hotplug.d/iface/30-ext-devices-rps-setting @@ -5,10 +5,15 @@ NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)" IFNAME_PREFIX="${INTERFACE%%[0-9]*}" -if [ "${IFNAME_PREFIX}" = "usb" ] || [ "${IFNAME_PREFIX}" = "wwan" ]; then +if [ "${IFNAME_PREFIX}" = "usb" ] || [ "${IFNAME_PREFIX}" = "wwan" ] || [ "${IFNAME_PREFIX}" = "rmnet" ] || [ "${IFNAME_PREFIX}" = "eth2" ] || [ "${IFNAME_PREFIX}" = "eth3" ] || [ "${IFNAME_PREFIX}" = "eth4" ] || [ "${IFNAME_PREFIX}" = "eth5" ]; then if [ "$ACTION" = add ]; then - # set usb/wwan rps to cpu0 + if [ "$NPROCS" -gt 2 ]; then + # set usb/wwan rps to cpu2 + echo 2 > /sys/class/net/${INTERFACE}/queues/rx-0/rps_cpus + else + # set usb/wwan rps to cpu1 echo 1 > /sys/class/net/${INTERFACE}/queues/rx-0/rps_cpus + fi fi [ -f /etc/init.d/mtk_smp ] && /etc/init.d/mtk_smp restart fi