• Ido Schimmel's avatar
    devlink: Add packet trap group parameters support · f9f54392
    Ido Schimmel authored
    Packet trap groups are used to aggregate logically related packet traps.
    Currently, these groups allow user space to batch operations such as
    setting the trap action of all member traps.
    
    In order to prevent the CPU from being overwhelmed by too many trapped
    packets, it is desirable to bind a packet trap policer to these groups.
    For example, to limit all the packets that encountered an exception
    during routing to 10Kpps.
    
    Allow device drivers to bind default packet trap policers to packet trap
    groups when the latter are registered with devlink.
    
    The next patch will enable user space to change this default binding.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f9f54392
spectrum_trap.c 15.7 KB