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>