summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2020-03-30 22:38:18 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-31 03:54:58 +0300
commit1e8c66198926e4391c7fe67401126776c5e9de3b (patch)
tree1e0068f64348d29ed3df8e3f503c9f195d4cd45a /Documentation
parent2d39eab45b2cd0392515d5e442c4fcb02a751c51 (diff)
downloadlinux-1e8c66198926e4391c7fe67401126776c5e9de3b.tar.xz
devlink: Add packet trap policers support
Devices capable of offloading the kernel's datapath and perform functions such as bridging and routing must also be able to send (trap) specific packets to the kernel (i.e., the CPU) for processing. For example, a device acting as a multicast-aware bridge must be able to trap IGMP membership reports to the kernel for processing by the bridge module. In most cases, the underlying device is capable of handling packet rates that are several orders of magnitude higher compared to those that can be handled by the CPU. Therefore, in order to prevent the underlying device from overwhelming the CPU, devices usually include packet trap policers that are able to police the trapped packets to rates that can be handled by the CPU. This patch allows capable device drivers to register their supported packet trap policers with devlink. User space can then tune the parameters of these policer (currently, rate and burst size) and read from the device the number of packets that were dropped by the policer, if supported. Subsequent patches in the series will allow device drivers to create default binding between these policers and packet trap groups and allow user space to change the binding. v2: * Add 'strict_start_type' in devlink policy * Have device drivers provide max/min rate/burst size for each policer. Use them to check validity of user provided parameters Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions