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>
Thu, 16 Jan 2025 12:30:17 +0000 (13:30 +0100)
commit50f7dca3a6efab39438981bd3b6d40672e3e4868
tree5341eea2e705bfcd0471f82380a5caba367baffa
parent0a7c8ed9d94930ba062c71df79f63c06eeab4543
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