summaryrefslogtreecommitdiff
path: root/ip
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-04-07 16:11:39 -0700
committerStephen Hemminger <stephen@networkplumber.org>2016-04-11 21:51:28 +0000
commitf1c656e5c0f0bed919a87856e3916116e6e4c2a4 (patch)
treee22111c47bc38b7012375d5440306443b223bf7c /ip
parent6268b08c13e9513b51d66a0d167fb5ecf23f3ce8 (diff)
iplink: display number of rx/tx queues
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>
Diffstat (limited to 'ip')
-rw-r--r--ip/ipaddress.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 3998d8ce..f7bd1c76 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -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]));