]> git.ipfire.org Git - thirdparty/iproute2.git/commit
police: add support for packet-per-second rate limiting
authorBaowen Zheng <baowen.zheng@corigine.com>
Fri, 26 Mar 2021 12:50:18 +0000 (13:50 +0100)
committerDavid Ahern <dsahern@kernel.org>
Tue, 30 Mar 2021 03:04:50 +0000 (03:04 +0000)
commitcf9ae1bd31187d8ae62bc1bb408e443dbc8bd6a0
treec5c9a318e7af07a173e6168684ff4b7440823ec5
parent16430e9afdcfbea33e1a251955c5801afc3756e9
police: add support for packet-per-second rate limiting

Allow a policer action to enforce a rate-limit based on packets-per-second,
configurable using a packet-per-second rate and burst parameters.

e.g.
 # $TC actions add action police pkts_rate 1000 pkts_burst 200 index 1
 # $TC actions ls action police
 total acts 1

action order 0:  police 0x1 rate 0bit burst 0b mtu 4096Mb pkts_rate 1000 pkts_burst 200
ref 1 bind 0

Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Louis Peens <louis.peens@netronome.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
man/man8/tc-police.8
tc/m_police.c