]> git.proxmox.com Git - mirror_iproute2.git/commit - rdma/utils.c
rdma: Print net device name and index for RDMA device
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 3 Apr 2018 04:29:14 +0000 (07:29 +0300)
committerDavid Ahern <dsahern@gmail.com>
Fri, 6 Apr 2018 16:02:32 +0000 (09:02 -0700)
commit152594273608612604fe773a762bce2327427e32
tree8f2275506ac7c04cb57c4a370997584e7067c59d
parent09e3802b9ab5684dc17b159a307d662060c6ce2f
rdma: Print net device name and index for RDMA device

The RDMA devices are operated in RoCE and iWARP modes have net device
underneath. Present their names in regular output and their net index
in detailed mode.

[root@nps ~]# rdma link show mlx5_3/1
4/1: mlx5_3/1: state ACTIVE physical_state LINK_UP netdev ens7
[root@nps ~]# rdma link show mlx5_3/1 -d
4/1: mlx5_3/1: state ACTIVE physical_state LINK_UP netdev ens7 netdev_index 7
    caps: <CM, IP_BASED_GIDS>

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
rdma/include/uapi/rdma/rdma_netlink.h
rdma/link.c
rdma/utils.c