[DTrace-devel] [PATCH] tcp provider: use __ip_queue_xmit() as it is non-static on 5.4
Alan Maguire
alan.maguire at oracle.com
Mon Aug 25 17:16:05 UTC 2025
On older kernels - 5.4 to be precise - ip_queue_xmit() is a static
function, so it is better to instrument __ip_queue_xmit() as it
is extern so not prone to optimization on 5.4 and later kernels.
With this change, the following previously-failing-on-UEK6U3 tcp tests
pass (and continue to pass when tested on an upstream kernel):
tst.ipv4localtcp.sh
tst.ipv4remotetcp.sh
tst.ipv6localtcp.sh
More work is required to fix up the tcpstate tests for UEK6U3.
Reported-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
---
libdtrace/dt_prov_tcp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libdtrace/dt_prov_tcp.c b/libdtrace/dt_prov_tcp.c
index ebdcfbc9..a191efe1 100644
--- a/libdtrace/dt_prov_tcp.c
+++ b/libdtrace/dt_prov_tcp.c
@@ -37,7 +37,10 @@ static probe_dep_t probes[] = {
{ "connect-refused",
DTRACE_PROBESPEC_NAME, "fbt::tcp_reset:entry" },
{ "connect-request",
- DTRACE_PROBESPEC_NAME, "fbt::ip_queue_xmit:entry" },
+ /* ip_queue_xmit() is static for older kernels so use __ip_queue_xmit()
+ * which is non-static for older and newer kernels.
+ */
+ DTRACE_PROBESPEC_NAME, "fbt::__ip_queue_xmit:entry" },
/* ip6_xmit has > 6 args so cannot fentry on aarch64; use rawfbt */
{ "connect-request",
DTRACE_PROBESPEC_NAME, "rawfbt::ip6_xmit:entry" },
@@ -48,7 +51,7 @@ static probe_dep_t probes[] = {
{ "receive",
DTRACE_PROBESPEC_NAME, "fbt::tcp_v4_send_reset:entry" },
{ "send",
- DTRACE_PROBESPEC_NAME, "fbt::ip_queue_xmit:entry" },
+ DTRACE_PROBESPEC_NAME, "fbt::__ip_queue_xmit:entry" },
/* ip_send_unicast_reply has 10 args so cannot fentry; use rawfbt */
{ "send",
DTRACE_PROBESPEC_NAME, "rawfbt::ip_send_unicast_reply:entry" },
--
2.43.5
More information about the DTrace-devel
mailing list