• Nikolay Aleksandrov's avatar
    bonding: add support for xstats and export 3ad stats · a258aeac
    Nikolay Aleksandrov authored
    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: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a258aeac
bond_3ad.c 85.2 KB