]> git.proxmox.com Git - mirror_iproute2.git/commit
rdma: Properly print device and link names in CLI output
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 11 Aug 2020 07:32:01 +0000 (10:32 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 16 Aug 2020 22:50:02 +0000 (15:50 -0700)
commitdb6d6becb0b39c49a1491a88f965ad188b88e9ee
tree7f4671d4803edbeebe06e225f1897489b0f35449
parent7ded3c97b9836f2ae0bf21fc79d8559357acb190
rdma: Properly print device and link names in CLI output

The citied commit broke the CLI output and printed ifindex/ifname
instead of dev/link.

Before:
[leonro@vm ~]$ rdma res show qp
link mlx5_0/lqpn 1 type GSI state RTS sq-psn 0 comm ib_core
[leonro@vm ~]$ rdma res show cq
ifindex 0 ifname rocep0s9 cqn 0 cqe 1023 users 2 poll-ctx WORKQUEUE adaptive-moderation on comm ib_core

After:
[leonro@vm ~]$ rdma res show qp
link mlx5_0/- lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
[leonro@vm ~]$ rdma res show cq
dev rocep0s9 cqn 0 cqe 1023 users 2 poll-ctx WORKQUEUE adaptive-moderation on comm [ib_core]

It was missed because rdmatool mostly used in JSON mode.

Fixes: b0a688a542cd ("rdma: Rewrite custom JSON and prints logic to use common API")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
rdma/res.c