diff options
author | Baowen Zheng <baowen.zheng@corigine.com> | 2021-03-12 15:08:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-13 14:18:09 -0800 |
commit | 2ffe0395288aa237ff7e0143366bd1cd57bfc5b7 (patch) | |
tree | e6afb13e32102f6b667b8f69c9a9cf9a0f270755 /include/uapi/linux/pkt_cls.h | |
parent | 6a56e19902af01da447cd3104d5a6e8d01792ee1 (diff) | |
download | linux-next-2ffe0395288aa237ff7e0143366bd1cd57bfc5b7.tar.gz |
net/sched: act_police: add support for packet-per-second policing
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 filter add dev tap1 parent ffff: u32 match \
u32 0 0 police pkts_rate 3000 pkts_burst 1000
Testing was unable to uncover a performance impact of this change on
existing features.
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 S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/pkt_cls.h')
-rw-r--r-- | include/uapi/linux/pkt_cls.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index 7ea59cfe1fa7..025c40fef93d 100644 --- a/include/uapi/linux/pkt_cls.h +++ b/include/uapi/linux/pkt_cls.h @@ -190,6 +190,8 @@ enum { TCA_POLICE_PAD, TCA_POLICE_RATE64, TCA_POLICE_PEAKRATE64, + TCA_POLICE_PKTRATE64, + TCA_POLICE_PKTBURST64, __TCA_POLICE_MAX #define TCA_POLICE_RESULT TCA_POLICE_RESULT }; |