• Ido Schimmel's avatar
    mlxsw: spectrum_span: Allow setting policer on a SPAN agent · 4039504e
    Ido Schimmel authored
    When mirroring packets to the CPU port the mirrored packets are trapped
    to the CPU. However, unlike other traps, it is not possible to set a
    policer on the associated trap group. Instead, the policer needs to be
    set on the SPAN agent.
    
    Moreover, the policer ID must be within a specified range: From a
    configurable (even) base ID to this base plus the maximum number of SPAN
    agents.
    
    While the immediate use case is to set the policer on a SPAN agent that
    mirrors to the CPU port, a policer can be set on any SPAN agent.
    Therefore, the operation is implemented for all SPAN agent types.
    
    Extend the SPAN agent request API to allow passing the desired policer
    ID that should be bound to the SPAN agent. Return an error for
    Spectrum-1, as it does not support policer setting on a SPAN agent.
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4039504e
spectrum_acl_flex_actions.c 5.58 KB