Conversation
Before USE_MQ would be always set to zero if default.sh was included by a script that did not set SUPPORT_MQ. Once USE_MQ was set to zero, it could never be set to 1 again. This patch inverts this logic, such that whenever SUPPORT_MQ is set, USE_MQ is also set. Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
|
Before merge, let me just test it again, just to be sure. |
|
I wonder whether we should not simply drive the selection via the qdisc variable, sure that way people will actively need to opt in for mq-cake instead of sqm's cake scripts defaulting to mq-cake, but we dont't need extra variable and logic?
On February 17, 2026 6:30:09 PM GMT+01:00, jkoeppeler ***@***.***> wrote:
jkoeppeler left a comment (tohojo/sqm-scripts#183)
Before merge, let me just test it again, just to be sure.
--
Reply to this email directly or view it on GitHub:
#183 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
ip command in busybox does not support creation of multi queue ifb devices and will silently create a single queue device. Thus verifying cake_mq will always fail. To correctly verify cake_mq, try to install cake_mq on the real interface instead. Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
9ba9404 to
ebf63be
Compare
src/functions.sh
Outdated
| #cake_mq needs to be tested on a multi-queue device | ||
| #ip command in busybox does not support creating a multi tx queue ifb device | ||
| #thus test cake_mq on the real interface. | ||
| cake_mq) dev=$IFACE ;; |
There was a problem hiding this comment.
No, this is no good - replacing the qdisc on the physical interface has side effects, so we shouldn't be doing that for testing.
Instead, we'll need to try the real attachment with cake_mq, and if that fails, fall back to regular cake.
Maybe a helper function, like:
install_cake()
{
local iface
local qdisc
local res
iface=$1
shift
qdisc=$(select_cake $iface)
$TC qdisc replace dev $iface root $qdisc "$@"
res=$?
if [ "$res" -ne "0" ] && [ "$qdisc" = "cake_mq" ]; then
$TC qdisc replace dev $iface root cake "$@"
res=$?
fi
return $res
}And then call it from the .qos scripts in place of the tc qdisc calls...
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
33a6c01 to
6d8086b
Compare
This reverts commit ebf63be. Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
b28e694 to
934d8d3
Compare
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
This reverts commit 1d7ea82. Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
|
Just to discuss this fully, and to understand the rationale against it. Why not simply use the $QDISC variable to let the user explicitly choose between cake and mq-cake. And make the choice of the IFB number of queues directly dependent on $QDISC being mq-cake. If that fails we simply use the already existing and hopefully working error reporting (we might add a pointer to install iputils-ip to work around busybox)? |
|
I think what I also like about this, is that it is more explicit, which qdisc is currently installed. But maybe we should then add iputils-ip as a dependency. Only if people have iputils-ip installed cake_mq will appear as "available qdisc". |
|
Closing in favour of #184 |
Before USE_MQ would be always set to zero if default.sh was included by a script that did not set SUPPORT_MQ. Once USE_MQ was set to zero, it could never be set to 1 again. This patch inverts this logic, such that whenever SUPPORT_MQ is set, USE_MQ is also set.