netifd: improve packet steering on ipq40xx (and possibly others)
authorFelix Fietkau <nbd@nbd.name>
Thu, 16 Jan 2025 11:35:47 +0000 (12:35 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 17 Jan 2025 08:48:27 +0000 (09:48 +0100)
commitacce25b789d40f2d88a2326a7d9921bd1743fe54
tree9b43edfc45f1852ab590612bf4fbc7e42df3d3b7
parent693c1ea81a314cfa37a60a293568d2e46282b717
netifd: improve packet steering on ipq40xx (and possibly others)

Some platforms a single ethernet device for all ports with multiple rx rings
and NAPI threading enabled. In this case, the steering script was limiting
performance by keeping all NAPI threads assigned to the same CPU.
Fix this by assigning each rx queue and the corresponding NAPI task separately.
Additionally, if the number of rx queues is at least as big as the number of
CPUs, skip weight based assignment and distribute the load across all CPUs
directly.

Fixes: https://github.com/openwrt/openwrt/issues/17611
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/netifd/files/usr/libexec/network/packet-steering.uc