aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-06-08 16:30:47 +0200
committerFelix Fietkau <nbd@nbd.name>2020-06-10 16:17:12 +0200
commit4baf90de8d65fbecac3eede535bdd7e7c2fceda8 (patch)
treeb1824deb1461fc70997a0f4b21d1d626a3065d79 /package/network
parentbf3f06f1ba9667bc81b247ce8d1ec6f18b926ea8 (diff)
downloadupstream-4baf90de8d65fbecac3eede535bdd7e7c2fceda8.tar.gz
upstream-4baf90de8d65fbecac3eede535bdd7e7c2fceda8.tar.bz2
upstream-4baf90de8d65fbecac3eede535bdd7e7c2fceda8.zip
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 <nbd@nbd.name>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering13
1 files changed, 9 insertions, 4 deletions
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