]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: add support for xstats and export 3ad stats
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 18 Jan 2019 12:30:23 +0000 (14:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jan 2019 20:04:14 +0000 (12:04 -0800)
commit88c5429b7c613073c2301a9ec34ac74488368d01
tree048540eec82f15a4ebd86c8511373b0be843a3f8
parent1ca2a68d075960fbc7f2efa326b648f600e560d6
bonding: add support for xstats and export 3ad stats

This patch adds support for extended statistics (xstats) call to the
bonding. The first user would be the 3ad code which counts the following
events:
 - LACPDU Rx/Tx
 - LACPDU unknown type Rx
 - LACPDU illegal Rx
 - Marker Rx/Tx
 - Marker response Rx/Tx
 - Marker unknown type Rx

All of these are exported via netlink as separate attributes to be
easily extensible as we plan to add more in the future.
Similar to how the bridge and other xstats exports, the structure
inside is:
 [ IFLA_STATS_LINK_XSTATS ]
   -> [ LINK_XSTATS_TYPE_BOND ]
        -> [ BOND_XSTATS_3AD ]
             -> [ 3ad stats attributes ]

With this structure it's easy to add more stat types later.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c
drivers/net/bonding/bond_netlink.c
include/net/bond_3ad.h
include/uapi/linux/if_bonding.h
include/uapi/linux/if_link.h