History

net_sched: add performance counters for basic filter

Similar to u32 filter, it is useful to know how many times we reach each basic filter and how many times we pass the ematch attached to it. Sample output: filter protocol arp pref 49152 basic chain 0 filter protocol arp pref 49152 basic chain 0 handle 0x1 (rule hit 3 success 3) action order 1: gact action pass random type none pass val 0 index 1 ref 1 bind 1 installed 81 sec used 4 sec Action statistics: Sent 126 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0

Cong Wang committed 7 years ago

Commit 59548941 parent 0726f552 files · +32 −0Browse files

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

Unified · Split

include/uapi/linux/pkt_cls.h+7−0
@@ -333,12 +333,19 @@ enum { · 332 unmodified lines
333333
334334 /* Basic filter */
335335
336+struct tc_basic_pcnt {
337+ __u64 rcnt;
338+ __u64 rhit;
339+};
340+
336341 enum {
337342 TCA_BASIC_UNSPEC,
338343 TCA_BASIC_CLASSID,
339344 TCA_BASIC_EMATCHES,
340345 TCA_BASIC_ACT,
341346 TCA_BASIC_POLICE,
347+ TCA_BASIC_PCNT,
348+ TCA_BASIC_PAD,
342349 __TCA_BASIC_MAX
343350 };
344351