]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iplink: display number of rx/tx queues
authorEric Dumazet <edumazet@google.com>
Thu, 7 Apr 2016 23:11:39 +0000 (16:11 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 11 Apr 2016 21:51:28 +0000 (21:51 +0000)
We can set the attributes, so would be nice to display them when
provided by the kernel.

Signed-off-by: Eric Dumazet <edumazet@google.com>
ip/ipaddress.c

index 3998d8cec4ab24d056d824900cdfd58c0e607dbe..f7bd1c76bf96fdd9b422122034d44fcc2e4cc131 100644 (file)
@@ -894,6 +894,12 @@ int print_linkinfo(const struct sockaddr_nl *who,
        if (do_link && tb[IFLA_AF_SPEC] && show_details)
                print_af_spec(fp, tb[IFLA_AF_SPEC]);
 
+       if (tb[IFLA_NUM_TX_QUEUES] && show_details)
+               fprintf(fp, "numtxqueues %u ", rta_getattr_u32(tb[IFLA_NUM_TX_QUEUES]));
+
+       if (tb[IFLA_NUM_RX_QUEUES] && show_details)
+               fprintf(fp, "numrxqueues %u ", rta_getattr_u32(tb[IFLA_NUM_RX_QUEUES]));
+
        if ((do_link || show_details) && tb[IFLA_IFALIAS]) {
                fprintf(fp, "%s    alias %s", _SL_,
                        rta_getattr_str(tb[IFLA_IFALIAS]));