• Ido Schimmel's avatar
    mlxsw: spectrum_span: Add SPAN session identifier support · 5c7659eb
    Ido Schimmel authored
    When packets are mirrored to the CPU, the trap identifier with which the
    packets are trapped is determined according to the session identifier of
    the SPAN agent performing the mirroring. Packets that are trapped for
    the same logical reason (e.g., buffer drops) should use the same session
    identifier.
    
    Currently, a single session is implicitly supported (identifier 0) and
    is used for packets that are mirrored to the CPU due to buffer drops
    (e.g., early drop).
    
    Subsequent patches are going to mirror packets to the CPU due to
    sampling, which will require a different session identifier.
    
    Prepare for that by making the session identifier an attribute of the
    SPAN agent.
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5c7659eb
spectrum_span.c 46.5 KB