netifd: disable receive packet steering for DSA slave devices
authorFelix Fietkau <nbd@nbd.name>
Mon, 8 Jun 2020 14:30:47 +0000 (16:30 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 10 Jun 2020 14:17:12 +0000 (16:17 +0200)
It is already handled on the master device. Doing it twice reduces
performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering

index ce5e76096aa24f1aaeb9f13dd83d23ef17bbfc1e..8a86bf75f60040e97a7779628afb0993aee87c50 100644 (file)
@@ -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