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
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -333,12 +333,19 @@ enum { · 332 unmodified lines | |||
| 333 | 333 | ||
| 334 | /* Basic filter */ | 334 | /* Basic filter */ |
| 335 | 335 | ||
| 336 | struct tc_basic_pcnt { | ||
| 337 | __u64 rcnt; | ||
| 338 | __u64 rhit; | ||
| 339 | }; | ||
| 340 | |||
| 336 | enum { | 341 | enum { |
| 337 | TCA_BASIC_UNSPEC, | 342 | TCA_BASIC_UNSPEC, |
| 338 | TCA_BASIC_CLASSID, | 343 | TCA_BASIC_CLASSID, |
| 339 | TCA_BASIC_EMATCHES, | 344 | TCA_BASIC_EMATCHES, |
| 340 | TCA_BASIC_ACT, | 345 | TCA_BASIC_ACT, |
| 341 | TCA_BASIC_POLICE, | 346 | TCA_BASIC_POLICE, |
| 347 | TCA_BASIC_PCNT, | ||
| 348 | TCA_BASIC_PAD, | ||
| 342 | __TCA_BASIC_MAX | 349 | __TCA_BASIC_MAX |
| 343 | }; | 350 | }; |
| 344 | 351 | ||