public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: langfei <langfei@huawei.com>
To: <systemtap@sourceware.org>
Cc: <linfeilong@huawei.com>, <hewenliang4@huawei.com>, <langfei@huawei.com>
Subject: [PATCH] fix network tcp test
Date: Tue, 25 Apr 2023 15:08:04 +0800	[thread overview]
Message-ID: <20230425070804.6579-1-langfei@huawei.com> (raw)

Signed-off-by: langfei <langfei@huawei.com>
---
 tapset/linux/ipmib.stp                             | 6 ++++--
 tapset/linux/linuxmib.stp                          | 2 +-
 testsuite/systemtap.examples/network/tcp_trace.stp | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tapset/linux/ipmib.stp b/tapset/linux/ipmib.stp
index 6f51dfd52..23349ac91 100644
--- a/tapset/linux/ipmib.stp
+++ b/tapset/linux/ipmib.stp
@@ -271,7 +271,8 @@ probe ipmib.InAddrErrors=kernel.function("ip_route_input_noref").return!,
  * IPSTATS_MIB_INUNKNOWNPROTOS)
  */
 /* icmp_send() is called by ip_local_deliver_finish() */
-probe ipmib.InUnknownProtos=kernel.function("icmp_send")
+probe ipmib.InUnknownProtos=kernel.function("icmp_send"),
+			     kernel.function("__icmp_send")
 {
 	skb = $skb_in;
 	op = 1;
@@ -360,7 +361,8 @@ probe ipmib.OutRequests=kernel.function("ip_output"),
  * counted in the global @ReasmTimeout (equivalent to SNMP's MIB
  * IPSTATS_MIB_REASMTIMEOUT)
  */
-probe ipmib.ReasmTimeout=kernel.function("icmp_send")
+probe ipmib.ReasmTimeout=kernel.function("icmp_send"),
+			  kernel.function("__icmp_send")
 {
 	skb = $skb_in;
 	op = 0;
diff --git a/tapset/linux/linuxmib.stp b/tapset/linux/linuxmib.stp
index 63ec2481b..7662f0b2d 100644
--- a/tapset/linux/linuxmib.stp
+++ b/tapset/linux/linuxmib.stp
@@ -30,7 +30,7 @@ probe linuxmib.DelayedACKs = _linuxmib.DelayedACKs.* {}
 
 probe _linuxmib.DelayedACKs.A = kernel.function("tcp_send_ack")
 {
-	sk=$sk
+	sk=@choose_defined($sk,pointer_arg(1))
 	if ( !indelack_timer[sk] ) next
 	op=1
 	key = linuxmib_filter_key(sk,op);
diff --git a/testsuite/systemtap.examples/network/tcp_trace.stp b/testsuite/systemtap.examples/network/tcp_trace.stp
index 65a32f2e6..98c77c050 100755
--- a/testsuite/systemtap.examples/network/tcp_trace.stp
+++ b/testsuite/systemtap.examples/network/tcp_trace.stp
@@ -192,7 +192,7 @@ probe kernel.{function("tcp_rcv_established"),
 	}
 }
 
-probe kernel.function("tcp_transmit_skb")
+probe kernel.function("__tcp_transmit_skb")
 {
 	sk = $sk
 	key = filter_key(sk)
-- 
2.33.0


                 reply	other threads:[~2023-04-25  7:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425070804.6579-1-langfei@huawei.com \
    --to=langfei@huawei.com \
    --cc=hewenliang4@huawei.com \
    --cc=linfeilong@huawei.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).