HomeFreeBSD

netinet: add a probe point for IP, IP6, ICMP, ICMP6, UDP and TCP stats counters

Description

netinet: add a probe point for IP, IP6, ICMP, ICMP6, UDP and TCP stats counters

When debugging network issues one common clue is an unexpectedly
incrementing error counter. This is helpful, in that it gives us an
idea of what might be going wrong, but often these counters may be
incremented in different functions.

Add a static probe point for them so that we can use dtrace to get
futher information (e.g. a stack trace).

For example:
dtrace -n 'mib:ip:count: { printf("%d", arg0); stack(); }'

This can be disabled by setting the following kernel option:
options KDTRACE_NO_MIB_SDT

Reviewed by: gallatin, tuexen (previous version), gnn (previous version)
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43504

Details

Provenance
kpAuthored on Jan 18 2024, 7:44 PM
Reviewer
gallatin
Differential Revision
D43504: netinet: add a probe point for IP stats counters
Parents
rG34791f4ac79e: capsicum.h: Include ktrace.h only in kernel
Branches
Unknown
Tags
Unknown