• Jakub Kicinski's avatar
    ethtool: add FEC statistics · be85dbfe
    Jakub Kicinski authored
    Similarly to pause statistics add stats for FEC.
    
    The IEEE standard mandates two sets of counters:
     - 30.5.1.1.17 aFECCorrectedBlocks
     - 30.5.1.1.18 aFECUncorrectableBlocks
    where block is a block of bits FEC operates on.
    Each of these counters is defined per lane (PCS instance).
    
    Multiple vendors provide number of corrected _bits_ rather
    than/as well as blocks.
    
    This set adds the 2 standard-based block counters and a extra
    one for corrected bits.
    
    Counters are exposed to user space via netlink in new attributes.
    Each attribute carries an array of u64s, first element is
    the total count, and the following ones are a per-lane break down.
    
    Much like with pause stats the operation will not fail when driver
    does not implement the get_fec_stats callback (nor can the driver
    fail the operation by returning an error). If stats can't be
    reported the relevant attributes will be empty.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    be85dbfe
ethtool_netlink.h 18.1 KB