diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-10-10 10:06:21 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-10-11 11:24:25 +0000 |
| commit | 02923dd9b0de050b989b5a4103e402055cb7f61a (patch) | |
| tree | 26fb7a5eee882a310e1e47b05f390da68c95ea8c | |
| parent | 8217075f9ecb12fa9a4cf746541b9d3e1dc57e79 (diff) | |
dummynet: SDT probe dropped packets
Add static probe points to track where we increment io_pkt_drop. This is
intended to assist in debugging dummynet, allowing us to work out when and
hopefully why packets get dropped.
Sponsored by: Rubicon Communications, LLC ("Netgate")
| -rw-r--r-- | sys/netpfil/ipfw/ip_dn_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index 03116cb0641c..3a8de2b2bfee 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -43,6 +43,7 @@ #include <sys/priv.h> #include <sys/proc.h> #include <sys/rwlock.h> +#include <sys/sdt.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/sysctl.h> @@ -70,6 +71,9 @@ #endif #include <netpfil/ipfw/dn_sched.h> +SDT_PROVIDER_DEFINE(dummynet); +SDT_PROBE_DEFINE2(dummynet, , , drop, "struct mbuf *", "struct dn_queue *"); + /* * We keep a private variable for the simulation time, but we could * probably use an existing one ("softticks" in sys/kern/kern_timeout.c) @@ -545,6 +549,7 @@ dn_enqueue(struct dn_queue *q, struct mbuf* m, int drop) drop: V_dn_cfg.io_pkt_drop++; + SDT_PROBE2(dummynet, , , drop, m, q); q->ni.drops++; ni->drops++; FREE_PKT(m); @@ -1001,6 +1006,7 @@ done: dropit: V_dn_cfg.io_pkt_drop++; + SDT_PROBE2(dummynet, , , drop, m, q); DN_BH_WUNLOCK(); if (m) FREE_PKT(m); |
