• Nogah Frankel's avatar
    mlxsw: spectrum: Add policers for trap groups · 9148e7cf
    Nogah Frankel authored
    Configure policers and connect them to trap groups.
    
    While many trap groups share policer's configuration they don't share
    the actual policer because each trap group represents a different
    flow / protocol and we don't want one of them to be able to exceed its
    rate on behalf of another.
    For example, if STP and LLDP gets to send 128 packets/sec each, if we
    put them in one 256 packets/sec policer, one can send 200 packets while
    the other only 50.
    
    Note that IP2ME covers lots of flows, so it's limit is set to match the
    cpu ability to handle data.
    Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9148e7cf
spectrum.c 128 KB