]> git.proxmox.com Git - mirror_iproute2.git/commit
ip: bond: add xstats support
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 12 Mar 2019 16:41:28 +0000 (18:41 +0200)
committerDavid Ahern <dsahern@gmail.com>
Fri, 15 Mar 2019 20:58:16 +0000 (13:58 -0700)
commit440c5075d66291335d4e074f142453625a2f8c1f
treebc8e5b1e82da2f2e15158605b3bc4a1b316f070d
parenta9bc23a79227acbf8f11010e5ab3fc28da4b1aaa
ip: bond: add xstats support

Add bond and bond_slave xstats support with optional json output.
Example:
- Plain text:
$ ip link xstats type bond 802.3ad
 bond0
                    LACPDU Rx 2017
                    LACPDU Tx 2038
                    LACPDU Unknown type Rx 0
                    LACPDU Illegal Rx 0
                    Marker Rx 0
                    Marker Tx 0
                    Marker response Rx 0
                    Marker response Tx 0
                    Marker unknown type Rx 0

- JSON:
$ ip -j -p link xstats type bond 802.3ad
  [ {
        "ifname": "bond0",
        "802.3ad": {
            "lacpdu_rx": 219,
            "lacpdu_tx": 241,
            "lacpdu_unknown_rx": 0,
            "lacpdu_illegal_rx": 0,
            "marker_rx": 0,
            "marker_tx": 0,
            "marker_response_rx": 0,
            "marker_response_tx": 0,
            "marker_unknown_rx": 0
        }
    } ]

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/ip_common.h
ip/iplink_bond.c
ip/iplink_bond_slave.c