History

netfilter: conntrack: remove packet hotpath stats

These counters sit in hot path and do show up in perf, this is especially true for 'found' and 'searched' which get incremented for every packet processed. Information like searched=212030105 new=623431 found=333613 delete=623327 does not seem too helpful nowadays: - on busy systems found and searched will overflow every few hours (these are 32bit integers), other more busy ones every few days. - for debugging there are better methods, such as iptables' trace target, the conntrack log sysctls. Nowadays we also have perf tool. This removes packet path stat counters except those that are expected to be 0 (or close to 0) on a normal system, e.g. 'insert_failed' (race happened) or 'invalid' (proto tracker rejects). The insert stat is retained for the ctnetlink case. The found stat is retained for the tuple-is-taken check when NAT has to determine if it needs to pick a different source address.

Florian Westphal committed 10 years ago

Commit 8e8118f1 parent 6bd14305 files · +11 −29Browse files

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

Unified · Split

include/uapi/linux/netfilter/nfnetlink_conntrack.h+4−4
@@ -231,13 +231,13 @@ enum ctattr_secctx { · 230 unmodified lines
231 231
232enum ctattr_stats_cpu {232enum ctattr_stats_cpu {
233 CTA_STATS_UNSPEC,233 CTA_STATS_UNSPEC,
234 CTA_STATS_SEARCHED,234 CTA_STATS_SEARCHED, /* no longer used */
235 CTA_STATS_FOUND,235 CTA_STATS_FOUND,
236 CTA_STATS_NEW,236 CTA_STATS_NEW, /* no longer used */
237 CTA_STATS_INVALID,237 CTA_STATS_INVALID,
238 CTA_STATS_IGNORE,238 CTA_STATS_IGNORE,
239 CTA_STATS_DELETE,239 CTA_STATS_DELETE, /* no longer used */
240 CTA_STATS_DELETE_LIST,240 CTA_STATS_DELETE_LIST, /* no longer used */
241 CTA_STATS_INSERT,241 CTA_STATS_INSERT,
242 CTA_STATS_INSERT_FAILED,242 CTA_STATS_INSERT_FAILED,
243 CTA_STATS_DROP,243 CTA_STATS_DROP,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t