* [PATCH 0/5] udp provider
@ 2025-08-22 18:16 Alan Maguire
2025-08-22 18:16 ` [PATCH 1/5] udp: new provider Alan Maguire
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
This series adds UDP provider support, where the probes are
implemented via underlying fbt probes.
Probes are
udp:::send
udp:::receive
Arguemnts args[0-4] are
pktinfo_t *, csinfo_t *, ipinfo_t *, udpsinfo_t *, udpinfo_t *
Patch 1 implements the provider.
Patch 2 syncs the new udp.d with dlibs.
Patches 3/4/5 update tests.
Alan Maguire (5):
udp: new provider
dlibs: sync dlibs with libdtrace/udp.d
unittest/udp: update test.x now that udp provider is present
test/unittest/udp: enable IPv4 remote udp test
test: Add udp to expecetd providers
dlibs/aarch64/5.11/udp.d | 11 +-
dlibs/aarch64/5.12/udp.d | 11 +-
dlibs/aarch64/5.14/udp.d | 11 +-
dlibs/aarch64/5.16/udp.d | 11 +-
dlibs/aarch64/5.2/udp.d | 11 +-
dlibs/aarch64/5.6/udp.d | 11 +-
dlibs/aarch64/6.1/udp.d | 11 +-
dlibs/aarch64/6.10/udp.d | 11 +-
dlibs/x86_64/5.11/udp.d | 11 +-
dlibs/x86_64/5.12/udp.d | 11 +-
dlibs/x86_64/5.14/udp.d | 11 +-
dlibs/x86_64/5.16/udp.d | 11 +-
dlibs/x86_64/5.2/udp.d | 11 +-
dlibs/x86_64/5.6/udp.d | 11 +-
dlibs/x86_64/6.1/udp.d | 11 +-
dlibs/x86_64/6.10/udp.d | 11 +-
libdtrace/Build | 2 +
libdtrace/dt_prov_udp.c | 170 ++++++++++++++++++++
libdtrace/dt_provider.c | 1 +
libdtrace/dt_provider.h | 1 +
libdtrace/udp.d | 11 +-
test/unittest/dtrace-util/tst.ListProbes.r | 1 +
test/unittest/dtrace-util/tst.ListProbes.sh | 1 +
test/unittest/udp/test.x | 6 +-
test/unittest/udp/tst.ipv4remoteudp.sh | 11 +-
25 files changed, 284 insertions(+), 96 deletions(-)
create mode 100644 libdtrace/dt_prov_udp.c
--
2.43.5
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/5] udp: new provider
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
@ 2025-08-22 18:16 ` Alan Maguire
2025-08-28 17:56 ` [DTrace-devel] " Eugene Loh
2025-08-22 18:16 ` [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d Alan Maguire
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
Based upon fbt probes support UDP send, receive.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
libdtrace/Build | 2 +
libdtrace/dt_prov_udp.c | 170 ++++++++++++++++++++++++++++++++++++++++
libdtrace/dt_provider.c | 1 +
libdtrace/dt_provider.h | 1 +
libdtrace/udp.d | 11 +--
5 files changed, 180 insertions(+), 5 deletions(-)
create mode 100644 libdtrace/dt_prov_udp.c
diff --git a/libdtrace/Build b/libdtrace/Build
index b0862ffa..5caf3462 100644
--- a/libdtrace/Build
+++ b/libdtrace/Build
@@ -59,6 +59,7 @@ libdtrace-build_SOURCES = dt_aggregate.c \
dt_prov_sdt.c \
dt_prov_syscall.c \
dt_prov_tcp.c \
+ dt_prov_udp.c \
dt_prov_uprobe.c \
dt_provider.c \
dt_provider_sdt.c \
@@ -118,6 +119,7 @@ dt_prov_sched.c_CFLAGS := -Wno-pedantic
dt_prov_sdt.c_CFLAGS := -Wno-pedantic
dt_prov_syscall.c_CFLAGS := -Wno-pedantic
dt_prov_tcp.c_CFLAGS := -Wno-pedantic
+dt_prov_udp.c_CFLAGS := -Wno-pedantic
dt_prov_uprobe.c_CFLAGS := -Wno-pedantic
dt_debug.c_CFLAGS := -Wno-prio-ctor-dtor
diff --git a/libdtrace/dt_prov_udp.c b/libdtrace/dt_prov_udp.c
new file mode 100644
index 00000000..fdbbf18d
--- /dev/null
+++ b/libdtrace/dt_prov_udp.c
@@ -0,0 +1,170 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+ * Licensed under the Universal Permissive License v 1.0 as shown at
+ * http://oss.oracle.com/licenses/upl.
+ *
+ * The 'udp' SDT provider for DTrace-specific probes.
+ */
+#include <assert.h>
+#include <errno.h>
+#include <netinet/in.h>
+
+#include "dt_dctx.h"
+#include "dt_cg.h"
+#include "dt_provider_sdt.h"
+#include "dt_probe.h"
+
+static const char prvname[] = "udp";
+static const char modname[] = "vmlinux";
+
+enum {
+ NET_PROBE_OUTBOUND = 0,
+ NET_PROBE_INBOUND,
+};
+
+static probe_dep_t probes[] = {
+ { "receive",
+ DTRACE_PROBESPEC_NAME, "fbt::udp_queue_rcv_skb:entry" },
+ { "receive",
+ DTRACE_PROBESPEC_NAME, "fbt::udpv6_queue_rcv_skb:entry" },
+ { "send",
+ DTRACE_PROBESPEC_NAME, "fbt::ip_send_skb:entry" },
+ { "send",
+ DTRACE_PROBESPEC_NAME, "fbt::ip6_send_skb:entry" },
+ { NULL, }
+};
+
+static probe_arg_t probe_args[] = {
+
+ { "receive", 0, { 0, 0, "struct sk_buff *", "pktinfo_t *" } },
+ { "receive", 1, { 1, 0, "struct sock *", "csinfo_t *" } },
+ { "receive", 2, { 2, 0, "void_ip_t *", "ipinfo_t *" } },
+ { "receive", 3, { 3, 0, "struct udp_sock *", "udpsinfo_t *" } },
+ { "receive", 4, { 4, 0, "struct udphdr *", "udpinfo_t *" } },
+
+ { "send", 0, { 0, 0, "struct sk_buff *", "pktinfo_t *" } },
+ { "send", 1, { 1, 0, "struct sock *", "csinfo_t *" } },
+ { "send", 2, { 2, 0, "void_ip_t *", "ipinfo_t *" } },
+ { "send", 3, { 3, 0, "struct udp_sock *", "udpsinfo_t *" } },
+ { "send", 4, { 4, 0, "struct udphdr *", "udpinfo_t *" } },
+
+ { NULL, }
+};
+
+static const dtrace_pattr_t pattr = {
+{ DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_ISA },
+{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
+{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
+{ DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_ISA },
+{ DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_ISA },
+};
+
+/*
+ * Provide all the "udp" SDT probes.
+ */
+static int populate(dtrace_hdl_t *dtp)
+{
+ return dt_sdt_populate(dtp, prvname, modname, &dt_udp, &pattr,
+ probe_args, probes);
+}
+
+/*
+ * Generate a BPF trampoline for a SDT probe.
+ *
+ * The trampoline function is called when a SDT probe triggers, and it must
+ * satisfy the following prototype:
+ *
+ * int dt_udp(void *data)
+ *
+ * The trampoline will populate a dt_dctx_t struct and then call the function
+ * that implements the compiled D clause. It returns the value that it gets
+ * back from that function.
+ */
+static int trampoline(dt_pcb_t *pcb, uint_t exitlbl)
+{
+ dt_irlist_t *dlp = &pcb->pcb_ir;
+ dt_probe_t *prp = pcb->pcb_probe;
+ dt_probe_t *uprp = pcb->pcb_parent_probe;
+ int skbarg = 1;
+ int direction;
+
+ /*
+ * We construct the udp::: probe arguments as follows:
+ * arg0 = skb
+ * arg1 = sk
+ * arg2 = ip_hdr(skb) [if available]
+ * arg3 = sk [struct udp_sock *]
+ * arg4 = udp_hdr(skb)
+ * arg5 = NET_PROBE_INBOUND (0x1) | NET_PROBE_OUTBOUND (0x0)
+ * arg5 never makes it into supported args[], it is simply set to
+ * help inform translators about whether it is an inbound/outbound probe
+ */
+
+ if (strcmp(prp->desc->prb, "receive") == 0) {
+ direction = NET_PROBE_INBOUND;
+ /* get sk from arg0, store in arg3 */
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(0)));
+ emit(dlp, BPF_BRANCH_IMM(BPF_JEQ, BPF_REG_6, 0, exitlbl));
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(3), BPF_REG_6));
+ } else {
+ if (strcmp(uprp->desc->fun, "ip6_send_skb") == 0)
+ skbarg = 0;
+ direction = NET_PROBE_OUTBOUND;
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(skbarg)));
+ /* get sk from skb->sk, store in arg3 */
+ dt_cg_tramp_get_member(pcb, "struct sk_buff", BPF_REG_6, "sk");
+ emit(dlp, BPF_BRANCH_IMM(BPF_JEQ, BPF_REG_0, 0, exitlbl));
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(3), BPF_REG_0));
+ }
+
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(skbarg)));
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(0), BPF_REG_6));
+
+ /* Now get sk from arg3, store it in arg1 and ensure it is UDP */
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(3)));
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(1), BPF_REG_0));
+ dt_cg_tramp_get_member(pcb, "struct sock", BPF_REG_6,
+ "sk_protocol");
+ emit(dlp, BPF_BRANCH_IMM(BPF_JNE, BPF_REG_0, IPPROTO_UDP, exitlbl));
+
+ /*
+ * ip_hdr(skb) =
+ * skb_network_header(skb) = (include/linux/ip.h)
+ * skb->head + skb->network_header (include/linux/skbuff.h)
+ */
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(0)));
+ dt_cg_tramp_get_member(pcb, "struct sk_buff", BPF_REG_6, "head");
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(2), BPF_REG_0));
+
+ dt_cg_tramp_get_member(pcb, "struct sk_buff", BPF_REG_6,
+ "network_header");
+ emit(dlp, BPF_XADD_REG(BPF_DW, BPF_REG_7, DMST_ARG(2), BPF_REG_0));
+
+ /*
+ * udp_hdr(skb) =
+ * skb_transport_header(skb) = (include/linux/ip.h)
+ * skb->head + skb->transport_header (include/linux/skbuff.h)
+ */
+ emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_6, BPF_REG_7, DMST_ARG(0)));
+ dt_cg_tramp_get_member(pcb, "struct sk_buff", BPF_REG_6, "head");
+ emit(dlp, BPF_STORE(BPF_DW, BPF_REG_7, DMST_ARG(4), BPF_REG_0));
+ dt_cg_tramp_get_member(pcb, "struct sk_buff", BPF_REG_6,
+ "transport_header");
+ emit(dlp, BPF_XADD_REG(BPF_DW, BPF_REG_7, DMST_ARG(4), BPF_REG_0));
+
+ emit(dlp, BPF_STORE_IMM(BPF_DW, BPF_REG_7, DMST_ARG(5), direction));
+
+ return 0;
+}
+
+dt_provimpl_t dt_udp = {
+ .name = prvname,
+ .prog_type = BPF_PROG_TYPE_UNSPEC,
+ .populate = &populate,
+ .enable = &dt_sdt_enable,
+ .load_prog = &dt_bpf_prog_load,
+ .trampoline = &trampoline,
+ .probe_info = &dt_sdt_probe_info,
+ .destroy = &dt_sdt_destroy,
+};
diff --git a/libdtrace/dt_provider.c b/libdtrace/dt_provider.c
index b9a7196b..848fdc13 100644
--- a/libdtrace/dt_provider.c
+++ b/libdtrace/dt_provider.c
@@ -41,6 +41,7 @@ const dt_provimpl_t *dt_providers[] = {
&dt_sdt,
&dt_syscall,
&dt_tcp,
+ &dt_udp,
&dt_uprobe,
&dt_usdt,
NULL
diff --git a/libdtrace/dt_provider.h b/libdtrace/dt_provider.h
index 9d60e5ec..dc126671 100644
--- a/libdtrace/dt_provider.h
+++ b/libdtrace/dt_provider.h
@@ -89,6 +89,7 @@ extern dt_provimpl_t dt_sched;
extern dt_provimpl_t dt_sdt;
extern dt_provimpl_t dt_syscall;
extern dt_provimpl_t dt_tcp;
+extern dt_provimpl_t dt_udp;
extern dt_provimpl_t dt_uprobe;
extern dt_provimpl_t dt_usdt;
diff --git a/libdtrace/udp.d b/libdtrace/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/libdtrace/udp.d
+++ b/libdtrace/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
--
2.43.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
2025-08-22 18:16 ` [PATCH 1/5] udp: new provider Alan Maguire
@ 2025-08-22 18:16 ` Alan Maguire
2025-08-28 18:03 ` [DTrace-devel] " Eugene Loh
2025-08-22 18:16 ` [PATCH 3/5] unittest/udp: update test.x now that udp provider is present Alan Maguire
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
Sync dlibs versions with updated udp.d.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
dlibs/aarch64/5.11/udp.d | 11 ++++++-----
dlibs/aarch64/5.12/udp.d | 11 ++++++-----
dlibs/aarch64/5.14/udp.d | 11 ++++++-----
dlibs/aarch64/5.16/udp.d | 11 ++++++-----
dlibs/aarch64/5.2/udp.d | 11 ++++++-----
dlibs/aarch64/5.6/udp.d | 11 ++++++-----
dlibs/aarch64/6.1/udp.d | 11 ++++++-----
dlibs/aarch64/6.10/udp.d | 11 ++++++-----
dlibs/x86_64/5.11/udp.d | 11 ++++++-----
dlibs/x86_64/5.12/udp.d | 11 ++++++-----
dlibs/x86_64/5.14/udp.d | 11 ++++++-----
dlibs/x86_64/5.16/udp.d | 11 ++++++-----
dlibs/x86_64/5.2/udp.d | 11 ++++++-----
dlibs/x86_64/5.6/udp.d | 11 ++++++-----
dlibs/x86_64/6.1/udp.d | 11 ++++++-----
dlibs/x86_64/6.10/udp.d | 11 ++++++-----
16 files changed, 96 insertions(+), 80 deletions(-)
diff --git a/dlibs/aarch64/5.11/udp.d b/dlibs/aarch64/5.11/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.11/udp.d
+++ b/dlibs/aarch64/5.11/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/5.12/udp.d b/dlibs/aarch64/5.12/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.12/udp.d
+++ b/dlibs/aarch64/5.12/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/5.14/udp.d b/dlibs/aarch64/5.14/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.14/udp.d
+++ b/dlibs/aarch64/5.14/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/5.16/udp.d b/dlibs/aarch64/5.16/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.16/udp.d
+++ b/dlibs/aarch64/5.16/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/5.2/udp.d b/dlibs/aarch64/5.2/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.2/udp.d
+++ b/dlibs/aarch64/5.2/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/5.6/udp.d b/dlibs/aarch64/5.6/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/5.6/udp.d
+++ b/dlibs/aarch64/5.6/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/6.1/udp.d b/dlibs/aarch64/6.1/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/6.1/udp.d
+++ b/dlibs/aarch64/6.1/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/aarch64/6.10/udp.d b/dlibs/aarch64/6.10/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/aarch64/6.10/udp.d
+++ b/dlibs/aarch64/6.10/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.11/udp.d b/dlibs/x86_64/5.11/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.11/udp.d
+++ b/dlibs/x86_64/5.11/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.12/udp.d b/dlibs/x86_64/5.12/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.12/udp.d
+++ b/dlibs/x86_64/5.12/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.14/udp.d b/dlibs/x86_64/5.14/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.14/udp.d
+++ b/dlibs/x86_64/5.14/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.16/udp.d b/dlibs/x86_64/5.16/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.16/udp.d
+++ b/dlibs/x86_64/5.16/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.2/udp.d b/dlibs/x86_64/5.2/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.2/udp.d
+++ b/dlibs/x86_64/5.2/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/5.6/udp.d b/dlibs/x86_64/5.6/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/5.6/udp.d
+++ b/dlibs/x86_64/5.6/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/6.1/udp.d b/dlibs/x86_64/6.1/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/6.1/udp.d
+++ b/dlibs/x86_64/6.1/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
diff --git a/dlibs/x86_64/6.10/udp.d b/dlibs/x86_64/6.10/udp.d
index 0e44ed64..e5a0fc9b 100644
--- a/dlibs/x86_64/6.10/udp.d
+++ b/dlibs/x86_64/6.10/udp.d
@@ -7,6 +7,7 @@
#pragma D depends_on module vmlinux
#pragma D depends_on library net.d
+#pragma D depends_on library ip.d
#pragma D depends_on provider udp
/*
@@ -48,24 +49,24 @@ translator udpsinfo_t < struct udp_sock *S > {
*/
udps_addr = (uintptr_t)S;
udps_lport = arg4 ?
- (probename == "send" ? ntohs(((struct udphdr *)arg4)->source) :
+ (arg5 == NET_PROBE_OUTBOUND ? ntohs(((struct udphdr *)arg4)->source) :
ntohs(((struct udphdr *)arg4)->dest)) : 0;
udps_rport = arg4 ?
(probename == "send" ? ntohs(((struct udphdr *)arg4)->dest) :
ntohs(((struct udphdr *)arg4)->source)) : 0;
udps_laddr = arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->saddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->saddr :
&((struct iphdr *)arg2)->daddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->saddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->saddr :
&((struct ipv6hdr *)arg2)->daddr) :
"<unknown>";
udps_raddr =
arg2 && *(uint8_t *)arg2 >> 4 == 4 ?
- inet_ntoa(probename == "send" ? &((struct iphdr *)arg2)->daddr :
+ inet_ntoa(arg5 == NET_PROBE_OUTBOUND ? &((struct iphdr *)arg2)->daddr :
&((struct iphdr *)arg2)->saddr) :
arg2 && *(uint8_t *)arg2 >> 4 == 6 ?
- inet_ntoa6(probename == "send" ? &((struct ipv6hdr *)arg2)->daddr :
+ inet_ntoa6(arg5 == NET_PROBE_OUTBOUND ? &((struct ipv6hdr *)arg2)->daddr :
&((struct ipv6hdr *)arg2)->saddr) :
"<unknown>";
};
--
2.43.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5] unittest/udp: update test.x now that udp provider is present
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
2025-08-22 18:16 ` [PATCH 1/5] udp: new provider Alan Maguire
2025-08-22 18:16 ` [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d Alan Maguire
@ 2025-08-22 18:16 ` Alan Maguire
2025-08-28 18:06 ` Eugene Loh
2025-08-22 18:16 ` [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test Alan Maguire
2025-08-22 18:16 ` [PATCH 5/5] test: Add udp to expecetd providers Alan Maguire
4 siblings, 1 reply; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
test/unittest/udp/test.x | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/test/unittest/udp/test.x b/test/unittest/udp/test.x
index d3d7a598..2ff8d675 100755
--- a/test/unittest/udp/test.x
+++ b/test/unittest/udp/test.x
@@ -1,14 +1,10 @@
#!/bin/bash
#
# Oracle Linux DTrace.
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
-if ! check_provider udp; then
- echo "Could not load udp provider"
- exit 1
-fi
if ! perl -MIO::Socket::IP -e 'exit(0);' 2>/dev/null; then
exit 1
fi
--
2.43.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
` (2 preceding siblings ...)
2025-08-22 18:16 ` [PATCH 3/5] unittest/udp: update test.x now that udp provider is present Alan Maguire
@ 2025-08-22 18:16 ` Alan Maguire
2025-08-28 18:14 ` [DTrace-devel] " Eugene Loh
2025-08-22 18:16 ` [PATCH 5/5] test: Add udp to expecetd providers Alan Maguire
4 siblings, 1 reply; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
It just tests send so we can send to remote address
and verify probe firing.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
test/unittest/udp/tst.ipv4remoteudp.sh | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/test/unittest/udp/tst.ipv4remoteudp.sh b/test/unittest/udp/tst.ipv4remoteudp.sh
index 89309cfc..62ed186a 100755
--- a/test/unittest/udp/tst.ipv4remoteudp.sh
+++ b/test/unittest/udp/tst.ipv4remoteudp.sh
@@ -13,9 +13,7 @@
#
# 1. A change to the ip stack breaking expected probe behavior,
# which is the reason we are testing.
-# 2. No physical network interface is plumbed and up.
-# 3. No other hosts on this subnet are reachable and listening on rpcbind.
-# 4. An unlikely race causes the unlocked global send/receive
+# 2. An unlikely race causes the unlocked global send/receive
# variables to be corrupted.
#
# This test sends a UDP message using perl and checks that at least the
@@ -25,8 +23,6 @@
# 1 x udp:::send (UDP sent)
#
-# @@skip: not sure what port 31337 is supposed to be
-
if (( $# != 1 )); then
echo "expected one argument: <dtrace-path>" >&2
exit 2
@@ -41,7 +37,10 @@ if [[ ! -x $getaddr ]]; then
echo "could not find or execute sub program: $getaddr" >&2
exit 3
fi
-read source dest <<<`$getaddr ipv4 2>/dev/null`
+set -- $($getaddr ipv4)
+source="$1"
+dest="$2"
+
if (( $? != 0 )) || [[ -z $dest ]]; then
exit 67
fi
--
2.43.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/5] test: Add udp to expecetd providers
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
` (3 preceding siblings ...)
2025-08-22 18:16 ` [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test Alan Maguire
@ 2025-08-22 18:16 ` Alan Maguire
2025-08-28 18:16 ` [DTrace-devel] " Eugene Loh
4 siblings, 1 reply; 14+ messages in thread
From: Alan Maguire @ 2025-08-22 18:16 UTC (permalink / raw)
To: dtrace; +Cc: dtrace-devel, Alan Maguire
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
test/unittest/dtrace-util/tst.ListProbes.r | 1 +
test/unittest/dtrace-util/tst.ListProbes.sh | 1 +
2 files changed, 2 insertions(+)
diff --git a/test/unittest/dtrace-util/tst.ListProbes.r b/test/unittest/dtrace-util/tst.ListProbes.r
index ad557253..a1e185d4 100644
--- a/test/unittest/dtrace-util/tst.ListProbes.r
+++ b/test/unittest/dtrace-util/tst.ListProbes.r
@@ -12,3 +12,4 @@ sched
sdt
syscall
tcp
+udp
diff --git a/test/unittest/dtrace-util/tst.ListProbes.sh b/test/unittest/dtrace-util/tst.ListProbes.sh
index a747a045..744bb8ad 100755
--- a/test/unittest/dtrace-util/tst.ListProbes.sh
+++ b/test/unittest/dtrace-util/tst.ListProbes.sh
@@ -70,6 +70,7 @@ $dtrace $dt_flags -l \
$2 == "sdt" { mycheck($2, $1, 600, 6000); next }
$2 == "syscall" { mycheck($2, $1, 300, 3000); next }
$2 == "tcp" { mycheck($2, $1, 8, 8); next }
+ $2 == "udp" { mycheck($2, $1, 2, 2); next }
# nothing for usdt
# Unrecognized line.
--
2.43.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 1/5] udp: new provider
2025-08-22 18:16 ` [PATCH 1/5] udp: new provider Alan Maguire
@ 2025-08-28 17:56 ` Eugene Loh
2025-08-28 19:25 ` Eugene Loh
2025-08-29 7:58 ` Alan Maguire
0 siblings, 2 replies; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 17:56 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
FWIW, we should have the "cg: fix offset for > 8 bit bitfields in
dt_cg_ctf_offsetof()" patch land before this patch series does.
Anyhow, testing x86 and arm for OL8/UEK6 OL8/UEK7 OL9/UEK7 OL9/UEK8
OL10/UEK8, I get
test/unittest/udp/tst.ipv6localudp.sh: FAIL: expected results differ.
for
x86/OL8/UEK7
x86/OL9/UEK7
x86/OL9/UEK8
x86/OL10/UEK8
arm/OL10/UEK8
If you like, I can investigate more or report more details. I just
didn't want to dive in too deep without checking in with you first.
I do not know how documentation will be handled, but it's possible we
will start to see that become part of this repo, in which perhaps new
providers need to be accompanied by doc updates. But I guess that will
be the burden of whichever patch comes second.
Why is the module for these probes "vmlinux" when not all the underlying
probes are?
ID PROVIDER MODULE FUNCTION NAME
75616 fbt vmlinux udp_queue_rcv_skb entry
78708 fbt ipv6 udpv6_queue_rcv_skb entry
74498 fbt vmlinux ip_send_skb entry
77968 fbt ipv6 ip6_send_skb entry
I do not understand why the arg5 trick is needed, but I trust you!
On 8/22/25 14:16, Alan Maguire via DTrace-devel wrote:
> Based upon fbt probes support UDP send, receive.
To me, this would read more clearly if it were "Support UDP send and
receive, using fbt probes."
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d
2025-08-22 18:16 ` [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d Alan Maguire
@ 2025-08-28 18:03 ` Eugene Loh
0 siblings, 0 replies; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 18:03 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
Just a stylistic thing, but to my taste this could be squashed back to
the first patch: the review complexity does not get particularly worse
and the "atomicity" of the patches gets better.
FWIW, the commit message is not needed (IMO) since it simply restates
the subject line.
On 8/22/25 14:16, Alan Maguire via DTrace-devel wrote:
> Sync dlibs versions with updated udp.d.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] unittest/udp: update test.x now that udp provider is present
2025-08-22 18:16 ` [PATCH 3/5] unittest/udp: update test.x now that udp provider is present Alan Maguire
@ 2025-08-28 18:06 ` Eugene Loh
0 siblings, 0 replies; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 18:06 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
This really feels like it should be squashed into the 1/5 patch. How can
one add a new provider (patch 1/5) without tests? I understand that the
philosophy here is to consider the entire patch series at once -- and
splitting patches can make review easier -- but this really feels like
part of the 1/5 patch. To me, at least.
On 8/22/25 14:16, Alan Maguire wrote:
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> test/unittest/udp/test.x | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/test/unittest/udp/test.x b/test/unittest/udp/test.x
> index d3d7a598..2ff8d675 100755
> --- a/test/unittest/udp/test.x
> +++ b/test/unittest/udp/test.x
> @@ -1,14 +1,10 @@
> #!/bin/bash
> #
> # Oracle Linux DTrace.
> -# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
> +# Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
> # Licensed under the Universal Permissive License v 1.0 as shown at
> # http://oss.oracle.com/licenses/upl.
>
> -if ! check_provider udp; then
> - echo "Could not load udp provider"
> - exit 1
> -fi
> if ! perl -MIO::Socket::IP -e 'exit(0);' 2>/dev/null; then
> exit 1
> fi
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test
2025-08-22 18:16 ` [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test Alan Maguire
@ 2025-08-28 18:14 ` Eugene Loh
0 siblings, 0 replies; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 18:14 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
PS I do not understand the read->set change, but I'm good with R-b
anyhow, just to get rid of that skip.
On 8/22/25 14:16, Alan Maguire via DTrace-devel wrote:
> It just tests send so we can send to remote address
> and verify probe firing.
>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> test/unittest/udp/tst.ipv4remoteudp.sh | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/test/unittest/udp/tst.ipv4remoteudp.sh b/test/unittest/udp/tst.ipv4remoteudp.sh
> index 89309cfc..62ed186a 100755
> --- a/test/unittest/udp/tst.ipv4remoteudp.sh
> +++ b/test/unittest/udp/tst.ipv4remoteudp.sh
> @@ -13,9 +13,7 @@
> #
> # 1. A change to the ip stack breaking expected probe behavior,
> # which is the reason we are testing.
> -# 2. No physical network interface is plumbed and up.
> -# 3. No other hosts on this subnet are reachable and listening on rpcbind.
> -# 4. An unlikely race causes the unlocked global send/receive
> +# 2. An unlikely race causes the unlocked global send/receive
> # variables to be corrupted.
> #
> # This test sends a UDP message using perl and checks that at least the
> @@ -25,8 +23,6 @@
> # 1 x udp:::send (UDP sent)
> #
>
> -# @@skip: not sure what port 31337 is supposed to be
> -
> if (( $# != 1 )); then
> echo "expected one argument: <dtrace-path>" >&2
> exit 2
> @@ -41,7 +37,10 @@ if [[ ! -x $getaddr ]]; then
> echo "could not find or execute sub program: $getaddr" >&2
> exit 3
> fi
> -read source dest <<<`$getaddr ipv4 2>/dev/null`
> +set -- $($getaddr ipv4)
> +source="$1"
> +dest="$2"
> +
> if (( $? != 0 )) || [[ -z $dest ]]; then
> exit 67
> fi
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 5/5] test: Add udp to expecetd providers
2025-08-22 18:16 ` [PATCH 5/5] test: Add udp to expecetd providers Alan Maguire
@ 2025-08-28 18:16 ` Eugene Loh
0 siblings, 0 replies; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 18:16 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
s/expecetd/expected/
but really I think this should be squashed to the 1/5 patch.
On 8/22/25 14:16, Alan Maguire via DTrace-devel wrote:
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> test/unittest/dtrace-util/tst.ListProbes.r | 1 +
> test/unittest/dtrace-util/tst.ListProbes.sh | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/test/unittest/dtrace-util/tst.ListProbes.r b/test/unittest/dtrace-util/tst.ListProbes.r
> index ad557253..a1e185d4 100644
> --- a/test/unittest/dtrace-util/tst.ListProbes.r
> +++ b/test/unittest/dtrace-util/tst.ListProbes.r
> @@ -12,3 +12,4 @@ sched
> sdt
> syscall
> tcp
> +udp
> diff --git a/test/unittest/dtrace-util/tst.ListProbes.sh b/test/unittest/dtrace-util/tst.ListProbes.sh
> index a747a045..744bb8ad 100755
> --- a/test/unittest/dtrace-util/tst.ListProbes.sh
> +++ b/test/unittest/dtrace-util/tst.ListProbes.sh
> @@ -70,6 +70,7 @@ $dtrace $dt_flags -l \
> $2 == "sdt" { mycheck($2, $1, 600, 6000); next }
> $2 == "syscall" { mycheck($2, $1, 300, 3000); next }
> $2 == "tcp" { mycheck($2, $1, 8, 8); next }
> + $2 == "udp" { mycheck($2, $1, 2, 2); next }
> # nothing for usdt
>
> # Unrecognized line.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 1/5] udp: new provider
2025-08-28 17:56 ` [DTrace-devel] " Eugene Loh
@ 2025-08-28 19:25 ` Eugene Loh
2025-08-28 19:40 ` Kris Van Hees
2025-08-29 7:58 ` Alan Maguire
1 sibling, 1 reply; 14+ messages in thread
From: Eugene Loh @ 2025-08-28 19:25 UTC (permalink / raw)
To: Alan Maguire, dtrace; +Cc: dtrace-devel
On 8/28/25 13:56, Eugene Loh wrote:
> Anyhow, testing x86 and arm for OL8/UEK6 OL8/UEK7 OL9/UEK7 OL9/UEK8
> OL10/UEK8, I get
> test/unittest/udp/tst.ipv6localudp.sh: FAIL: expected results differ.
> for
> x86/OL8/UEK7
> x86/OL9/UEK7
> x86/OL9/UEK8
> x86/OL10/UEK8
> arm/OL10/UEK8
> If you like, I can investigate more or report more details. I just
> didn't want to dive in too deep without checking in with you first.
I took a quick and sloppy look at this. I looked at only one VM. The
failure was:
test/unittest/udp/tst.ipv6localudp.sh
Diff against expected:
Minimum UDP events seen
-ip:::send - yes
+ip:::send - no
-ip:::receive - yes
+ip:::receive - no
-udp:::send - yes
+udp:::send - no
udp:::receive - yes
I tried:
diff --git a/libdtrace/dt_prov_udp.c b/libdtrace/dt_prov_udp.c
@@ -31,7 +31,7 @@ static probe_dep_t probes[] = {
{ "send",
DTRACE_PROBESPEC_NAME, "fbt::ip_send_skb:entry" },
{ "send",
- DTRACE_PROBESPEC_NAME, "fbt::ip6_send_skb:entry" },
+ DTRACE_PROBESPEC_NAME, "rawfbt::ip6_send_skb:entry" },
{ NULL, }
};
diff --git a/libdtrace/dt_prov_ip.c b/libdtrace/dt_prov_ip.c
@@ -21,11 +21,11 @@ static probe_dep_t probes[] = {
{ "receive",
DTRACE_PROBESPEC_NAME, "fbt::ip_local_deliver:entry" },
{ "receive",
- DTRACE_PROBESPEC_NAME, "fbt::ip6_input:entry" },
+ DTRACE_PROBESPEC_NAME, "rawfbt::ip6_input:entry" },
{ "send",
DTRACE_PROBESPEC_NAME, "fbt::ip_finish_output:entry" },
{ "send",
- DTRACE_PROBESPEC_NAME, "fbt::ip6_finish_output:entry" },
+ DTRACE_PROBESPEC_NAME, "rawfbt::ip6_finish_output:entry" },
{ NULL, }
};
(The last change is also in another patch I recently posted and you
R-b.) With these changes on that VM, the test passes.
The whole thing suggests to me that we need a better audit of such
issues, better understanding, and more/better tests.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 1/5] udp: new provider
2025-08-28 19:25 ` Eugene Loh
@ 2025-08-28 19:40 ` Kris Van Hees
0 siblings, 0 replies; 14+ messages in thread
From: Kris Van Hees @ 2025-08-28 19:40 UTC (permalink / raw)
To: Eugene Loh; +Cc: Alan Maguire, dtrace, dtrace-devel
On Thu, Aug 28, 2025 at 03:25:39PM -0400, Eugene Loh wrote:
> On 8/28/25 13:56, Eugene Loh wrote:
>
> > Anyhow, testing x86 and arm for OL8/UEK6 OL8/UEK7 OL9/UEK7 OL9/UEK8
> > OL10/UEK8, I get
> > test/unittest/udp/tst.ipv6localudp.sh: FAIL: expected results differ.
> > for
> > x86/OL8/UEK7
> > x86/OL9/UEK7
> > x86/OL9/UEK8
> > x86/OL10/UEK8
> > arm/OL10/UEK8
> > If you like, I can investigate more or report more details. I just
> > didn't want to dive in too deep without checking in with you first.
>
> I took a quick and sloppy look at this. I looked at only one VM. The
> failure was:
>
> test/unittest/udp/tst.ipv6localudp.sh
> Diff against expected:
> Minimum UDP events seen
>
> -ip:::send - yes
> +ip:::send - no
> -ip:::receive - yes
> +ip:::receive - no
> -udp:::send - yes
> +udp:::send - no
> udp:::receive - yes
>
> I tried:
>
> diff --git a/libdtrace/dt_prov_udp.c b/libdtrace/dt_prov_udp.c
> @@ -31,7 +31,7 @@ static probe_dep_t probes[] = {
> { "send",
> DTRACE_PROBESPEC_NAME, "fbt::ip_send_skb:entry" },
> { "send",
> - DTRACE_PROBESPEC_NAME, "fbt::ip6_send_skb:entry" },
> + DTRACE_PROBESPEC_NAME, "rawfbt::ip6_send_skb:entry" },
> { NULL, }
> };
>
> diff --git a/libdtrace/dt_prov_ip.c b/libdtrace/dt_prov_ip.c
> @@ -21,11 +21,11 @@ static probe_dep_t probes[] = {
> { "receive",
> DTRACE_PROBESPEC_NAME, "fbt::ip_local_deliver:entry" },
> { "receive",
> - DTRACE_PROBESPEC_NAME, "fbt::ip6_input:entry" },
> + DTRACE_PROBESPEC_NAME, "rawfbt::ip6_input:entry" },
> { "send",
> DTRACE_PROBESPEC_NAME, "fbt::ip_finish_output:entry" },
> { "send",
> - DTRACE_PROBESPEC_NAME, "fbt::ip6_finish_output:entry" },
> + DTRACE_PROBESPEC_NAME, "rawfbt::ip6_finish_output:entry" },
> { NULL, }
> };
>
> (The last change is also in another patch I recently posted and you R-b.)
> With these changes on that VM, the test passes.
>
> The whole thing suggests to me that we need a better audit of such issues,
> better understanding, and more/better tests.
It might also be worth mentioning that it is possible to specify kernel version
range constraints for probes to be used so that DTrace can determine at runtime
which probes to enable. That and code in the trampoline (or in functions it
uses) to do the "right" thing depend on the probe being used is often enough
to deal with variants.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [DTrace-devel] [PATCH 1/5] udp: new provider
2025-08-28 17:56 ` [DTrace-devel] " Eugene Loh
2025-08-28 19:25 ` Eugene Loh
@ 2025-08-29 7:58 ` Alan Maguire
1 sibling, 0 replies; 14+ messages in thread
From: Alan Maguire @ 2025-08-29 7:58 UTC (permalink / raw)
To: Eugene Loh, dtrace; +Cc: dtrace-devel
On 28/08/2025 18:56, Eugene Loh wrote:
> FWIW, we should have the "cg: fix offset for > 8 bit bitfields in
> dt_cg_ctf_offsetof()" patch land before this patch series does.
>
> Anyhow, testing x86 and arm for OL8/UEK6 OL8/UEK7 OL9/UEK7 OL9/UEK8
> OL10/UEK8, I get
> test/unittest/udp/tst.ipv6localudp.sh: FAIL: expected results differ.
> for
> x86/OL8/UEK7
> x86/OL9/UEK7
> x86/OL9/UEK8
> x86/OL10/UEK8
> arm/OL10/UEK8
> If you like, I can investigate more or report more details. I just
> didn't want to dive in too deep without checking in with you first.
>
Thanks for the additional analysis on these in later messages! I think
given that udp[6]_queue_rcv_skb are static - and hence can wind up with
"." suffixes and not be fprobe-able - it's probably best to convert all
probe points to use rawfbt here.
> I do not know how documentation will be handled, but it's possible we
> will start to see that become part of this repo, in which perhaps new
> providers need to be accompanied by doc updates. But I guess that will
> be the burden of whichever patch comes second.
>
> Why is the module for these probes "vmlinux" when not all the underlying
> probes are?
> ID PROVIDER MODULE FUNCTION NAME
> 75616 fbt vmlinux udp_queue_rcv_skb entry
> 78708 fbt ipv6 udpv6_queue_rcv_skb entry
> 74498 fbt vmlinux ip_send_skb entry
> 77968 fbt ipv6 ip6_send_skb entry
>
It depends whether CONFIG_IPV6=y or CONFIG_IPV6=m I think; not sure how
to reflect that dynamically in dt_sdt_populate() tho.
> I do not understand why the arg5 trick is needed, but I trust you!
>
It originated in the TCP provider, where checking outbound/inbound was
more efficient than a string comparison on probe name, especially where
there were multiple inbound probes like receive, accept-established etc.
> On 8/22/25 14:16, Alan Maguire via DTrace-devel wrote:
>> Based upon fbt probes support UDP send, receive.
>
> To me, this would read more clearly if it were "Support UDP send and
> receive, using fbt probes."
Sure, will change. I'll also squash some of the patches as you suggest.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-08-29 7:59 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 18:16 [PATCH 0/5] udp provider Alan Maguire
2025-08-22 18:16 ` [PATCH 1/5] udp: new provider Alan Maguire
2025-08-28 17:56 ` [DTrace-devel] " Eugene Loh
2025-08-28 19:25 ` Eugene Loh
2025-08-28 19:40 ` Kris Van Hees
2025-08-29 7:58 ` Alan Maguire
2025-08-22 18:16 ` [PATCH 2/5] dlibs: sync dlibs with libdtrace/udp.d Alan Maguire
2025-08-28 18:03 ` [DTrace-devel] " Eugene Loh
2025-08-22 18:16 ` [PATCH 3/5] unittest/udp: update test.x now that udp provider is present Alan Maguire
2025-08-28 18:06 ` Eugene Loh
2025-08-22 18:16 ` [PATCH 4/5] test/unittest/udp: enable IPv4 remote udp test Alan Maguire
2025-08-28 18:14 ` [DTrace-devel] " Eugene Loh
2025-08-22 18:16 ` [PATCH 5/5] test: Add udp to expecetd providers Alan Maguire
2025-08-28 18:16 ` [DTrace-devel] " Eugene Loh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.