• Jakub Kicinski's avatar
    mlx5: count all link events · 490dceca
    Jakub Kicinski authored
    mlx5 devices were observed generating MLX5_PORT_CHANGE_SUBTYPE_ACTIVE
    events without an intervening MLX5_PORT_CHANGE_SUBTYPE_DOWN. This
    breaks link flap detection based on Linux carrier state transition
    count as netif_carrier_on() does nothing if carrier is already on.
    Make sure we count such events.
    
    netif_carrier_event() increments the counters and fires the linkwatch
    events. The latter is not necessary for the use case but seems like
    the right thing to do.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    490dceca
sch_generic.c 35.4 KB