Packet Steering

Hi, would packet steering need to be enabled under interfaces -> global network options for these settings to take effect?

echo 2 > /proc/irq/35/smp_affinity
echo 8 > /proc/irq/36/smp_affinity

echo e > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo e > /sys/class/net/eth1/queues/rx-0/rps_cpus
echo e > /sys/class/net/eth2/queues/rx-0/rps_cpus
echo e > /sys/class/net/eth4/queues/rx-0/rps_cpus

If LuCI (graphical interface) is installed:
Network > Interfaces > Global network options,
At the Packet Steering option, select/click Enabled

Someone more knowledgeable may explain difference(s) between Enabled vs Enabled (all CPUs)

Just a guess but Enabled may just be on one CPU vs multithreaded.

You seem to have a 4 core CPU (cores 0-3) (2 is core 1, 8 is core 3).
e designates all cores (1+2+4+8).

If your CPU can deal with irqbalance I would use irqbalance, but some recent cores do not like switching while processing and you need to set things manually on startup.
Check the threads of your router.

About packet steering I think it depends on your usage, do some speed testing while the router is operational.

1 Like

It heavily depends on the netcard, some run one irq per queue and irqbalance is sufficient
Enable means affining queues to 1st hyperthreads of cores, should usually be better performing than artificially torturing half-speed pseudocores.

The biggest effect of enabling receive packet steering typically is, that receive and transmit processing (think qdiscs like traffic shapers) is way more likely to end up on different CPUs, so for SQM on multicore routers packet steering tends to be a win, but the details matter, i.e. how many and which CPUs are used.
As @egc explained the value is interpreted as hexadecimal representation of a bitmap.

1 Like

Hmm. e would amount to all cores but core 0. (2^1+2^2+2^3=e) Your rps_cpus won't survive long, as the steering scripts will overwrite them.
Furthermore, are you running snapshot, because I'm having some problems with the current iteration of the steering scripts and workings. https://github.com/openwrt/openwrt/issues/15445