From: Yuval Mintz Date: Tue, 26 Dec 2017 09:48:45 +0000 (+0200) Subject: qdisc: print offload indication X-Git-Tag: v4.15.0~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b97c6fa71d8ff2329bba3d655c115da78149f035;p=thirdparty%2Fiproute2.git qdisc: print offload indication Use the newly added TCA_HW_OFFLOAD indication from kernel to print a consistent 'offloaded' message to user when listing qdiscs. Signed-off-by: Yuval Mintz Reviewed-by: Jiri Pirko Signed-off-by: Stephen Hemminger --- diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 4431d5fde..70279b9dc 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -266,6 +266,10 @@ int print_qdisc(const struct sockaddr_nl *who, if (t->tcm_info != 1) print_uint(PRINT_ANY, "refcnt", "refcnt %u ", t->tcm_info); + if (tb[TCA_HW_OFFLOAD] && + (rta_getattr_u8(tb[TCA_HW_OFFLOAD]))) + print_bool(PRINT_ANY, "offloaded", "offloaded ", true); + /* pfifo_fast is generic enough to warrant the hardcoding --JHS */ if (strcmp("pfifo_fast", RTA_DATA(tb[TCA_KIND])) == 0) q = get_qdisc_kind("prio");