• Po Liu's avatar
    net: enetc: count the tc-taprio window drops · 285e8ded
    Po Liu authored
    The enetc scheduler for IEEE 802.1Qbv has 2 options (depending on
    PTGCR[TG_DROP_DISABLE]) when we attempt to send an oversized packet
    which will never fit in its allotted time slot for its traffic class:
    either block the entire port due to head-of-line blocking, or drop the
    packet and set a bit in the writeback format of the transmit buffer
    descriptor, allowing other packets to be sent.
    
    We obviously choose the second option in the driver, but we do not
    detect the drop condition, so from the perspective of the network stack,
    the packet is sent and no error counter is incremented.
    
    This change checks the writeback of the TX BD when tc-taprio is enabled,
    and increments a specific ethtool statistics counter and a generic
    "tx_dropped" counter in ndo_get_stats64.
    Signed-off-by: default avatarPo Liu <Po.Liu@nxp.com>
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    285e8ded
enetc_ethtool.c 23.2 KB