• Ido Schimmel's avatar
    mlxsw: spectrum_trap: Add early_drop trap · 6687e953
    Ido Schimmel authored
    As previously explained, packets that are dropped due to buffer related
    reasons (e.g., tail drop, early drop) can be mirrored to the CPU port.
    These packets are then trapped with one of the "mirror session" traps
    and their CQE includes the reason for which the packet was mirrored.
    
    Register with devlink a new trap, early_drop, and initialize the
    corresponding Rx listener with the appropriate mirror reason. Return an
    error in case user tries to change the traps' action, as this is not
    supported.
    
    Since Spectrum-1 does not support these traps, the above is only done
    for Spectrum-2 onwards.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6687e953
core.h 16.9 KB