]> git.ipfire.org Git - thirdparty/iproute2.git/commit
rdma: Add json output to link object
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 20 Aug 2017 09:58:27 +0000 (12:58 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 22 Aug 2017 00:07:44 +0000 (17:07 -0700)
commit7fc75744c0677f70eff7586aaa40cc98ab27a7d9
treedfeb182fec344e431b08cf42e415dd2df1363d69
parentef353e2e947092f2a2dbcf2ea75f0b4b5a670cda
rdma: Add json output to link object

An example for the JSON output for two devices system.

root@mtr-leonro:~# rdma link -d -p -j
[{
        "ifindex": 1,
        "port": 1,
        "ifname": "mlx5_0/1",
        "subnet_prefix": "fe80:0000:0000:0000",
        "lid": 13399,
        "sm_lid": 49151,
        "lmc": 0,
        "state": "ACTIVE",
        "physical_state": "LINK_UP",
        "caps": ["AUTO_MIG"
        ]
    },{
        "ifindex": 2,
        "port": 1,
        "ifname": "mlx5_1/1",
        "subnet_prefix": "fe80:0000:0000:0000",
        "lid": 13400,
        "sm_lid": 49151,
        "lmc": 0,
        "state": "ACTIVE",
        "physical_state": "LINK_UP",
        "caps": ["AUTO_MIG"
        ]
    }
]

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
rdma/link.c
rdma/rdma.h
rdma/utils.c