From ceb78d66a28a3aa3cc25594c084e4ee006f34d42 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 8 Nov 2024 10:01:06 +0100 Subject: [PATCH] board/common: convert tc error message to useful information When we opportunistically set up mqprio on all interfaces, we pass over interfaces without offloading support. Catch that error message and log an informational message about which interfaces are skipped. Signed-off-by: Joachim Wiberg --- board/common/rootfs/usr/libexec/infix/init.d/25-mqprio | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio b/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio index 2f9dd971..ff1c99ea 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio +++ b/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio @@ -46,7 +46,11 @@ while [ "$1" ]; do [ $txqs -lt 2 ] && continue [ $txqs -gt 8 ] && txqs=8 - tc qdisc add dev $iface root mqprio hw 1 \ - num_tc $txqs $(map $txqs) $(queues $txqs) || true + output=$(tc qdisc add dev $iface root mqprio hw 1 \ + num_tc $txqs $(map $txqs) $(queues $txqs) 2>&1) || true + if echo "$output" | grep -q "does not support hardware offload"; then + echo "Skipping $iface, hardware offload not supported." + elif [ -n "$output" ]; then + echo "$output" + fi done -