Tags: tohojo/sqm-scripts
Tags
Default use_mq to off In some hardware configurations, unconditionally using cake_mq is problematic. In particular, some SoCs have 16 TX queues but only two CPUs, and 16 cake instances can end up taking up quite a bit of memory. To be cautious, default use_mq to off for now. Users can still opt in if they want to try out cake_mq on their hardware. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
sqm: gate USE_MQ after loading the selected qdisc script start-sqm sources defaults.sh before the selected *.qos script, so SUPPORT_MQ is not yet set at that point. This can force USE_MQ=0 even for scripts that declare SUPPORT_MQ=1 (e.g. piece_of_cake.qos). Move the SUPPORT_MQ gate to start-sqm after loading the selected script, and keep per-interface cake_mq selection in select_cake(). Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
Support cake_mq in the CAKE-based QoS scripts Support automatically selecting cake_mq in the layer_cake and piece_of_cake QoS scripts. On egress, cake_mq will be used if the device has multiple queues. On ingress, set MQ_IFB to ensure that the IFB devices are created as multi-queue, which will also allow us to use cake_mq there. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
runners: Expose a 'cleanup' action for silent cleanup of an interface If a network interface is removed before SQM is stopped on that interface, removing the qdisc from that interface will result in errors in the log. Whereas not running the 'stop' action will result in leftover state files (and possibly an IFB interface). While the right thing to do would be to stop SQM before removing the interface, this is not always possible; for instance, pppd doesn't have a 'pre-down' hook. So to accommodate this use case, add a new 'cleanup' action, which just unwinds the firewall rules, removes the IFB interface (but silently in case it does not exist), and deletes the state file. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
defaults.sh: Don't override INSMOD variable if it is already set @SpareSimian noticed that sqm-scripts would always use 'insmod' to load modules on CentOS even though modprobe was also available. @gordonmessmer noticed that this was due to the way the shell chains '&&' and '||' operators, which would evaluate the second assignment if the first zero-length check fails. And since defaults.sh is included from both 'start-sqm' and the .qos scripts, this double-evaluation always happens on non-OpenWrt installations. Fix this by properly grouping the assignment operators so they are evaluated together if the variable is unset. Fixes #133. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
PreviousNext