• I
    mlxsw: spectrum_trap: Add early_drop trap · 6687e953
    Ido Schimmel 提交于
    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: NPetr Machata <petrm@mellanox.com>
    Reviewed-by: NJiri Pirko <jiri@mellanox.com>
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    6687e953
core.h 16.9 KB