From: Felix Fietkau Date: Mon, 8 Jun 2020 14:30:47 +0000 (+0200) Subject: netifd: disable receive packet steering for DSA slave devices X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4baf90de8d65fbecac3eede535bdd7e7c2fceda8;p=openwrt%2Fstaging%2Fthess.git netifd: disable receive packet steering for DSA slave devices It is already handled on the master device. Doing it twice reduces performance Signed-off-by: Felix Fietkau --- diff --git a/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering b/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering index ce5e76096a..8a86bf75f6 100644 --- a/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering +++ b/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering @@ -52,11 +52,16 @@ for dev in /sys/class/net/*; do irq_cpu="$(find_irq_cpu "$device")" irq_cpu_mask="$((1 << $irq_cpu))" - for q in ${dev}/queues/rx-*; do - set_hex_val "$q/rps_cpus" "$PROC_MASK" - done - for q in ${dev}/queues/tx-*; do set_hex_val "$q/xps_cpus" "$PROC_MASK" done + + # ignore dsa slave ports for RPS + subsys="$(readlink "${dev}/device/subsystem")" + subsys="$(basename "$subsys")" + [ "$subsys" = "mdio_bus" ] && continue + + for q in ${dev}/queues/rx-*; do + set_hex_val "$q/rps_cpus" "$PROC_MASK" + done done