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:49:18 +0000 (09:49 +0100)
commit27520027e10e9d247e822e5c52a8bb294267ecd9
treec927b584c19dc9de26cf3573de45fc036828138b
parent99a855121c74974123558fd0ebad7888242c88af
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>
(cherry picked from commit acce25b789d40f2d88a2326a7d9921bd1743fe54)
package/network/config/netifd/files/usr/libexec/network/packet-steering.uc