From 4baf90de8d65fbecac3eede535bdd7e7c2fceda8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 8 Jun 2020 16:30:47 +0200 Subject: [PATCH] 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 --- .../files/etc/hotplug.d/net/20-smp-packet-steering | 13 +++++++++---- 1 file 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 ce5e76096aa..8a86bf75f60 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 -- 2.30.2