History

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.

Baowen Zheng committed 5 years ago

Commit 2ffe0391 parent 6a56e195 files · +162 −36Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/pkt_cls.h+2−0
@@ -190,6 +190,8 @@ enum { · 189 unmodified lines
190 TCA_POLICE_PAD,190 TCA_POLICE_PAD,
191 TCA_POLICE_RATE64,191 TCA_POLICE_RATE64,
192 TCA_POLICE_PEAKRATE64,192 TCA_POLICE_PEAKRATE64,
193 TCA_POLICE_PKTRATE64,
194 TCA_POLICE_PKTBURST64,
193 __TCA_POLICE_MAX195 __TCA_POLICE_MAX
194#define TCA_POLICE_RESULT TCA_POLICE_RESULT196#define TCA_POLICE_RESULT TCA_POLICE_RESULT
195};197};