<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/trace/events/icmp.h, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-05-08T09:39:26+00:00</updated>
<entry>
<title>net/ipv4: add tracepoint for icmp_send</title>
<updated>2024-05-08T09:39:26+00:00</updated>
<author>
<name>Peilin He</name>
<email>he.peilin@zte.com.cn</email>
</author>
<published>2024-05-07T07:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db3efdcf70c752e8a8deb16071d8e693c3ef8746'/>
<id>urn:sha1:db3efdcf70c752e8a8deb16071d8e693c3ef8746</id>
<content type='text'>
Introduce a tracepoint for icmp_send, which can help users to get more
detail information conveniently when icmp abnormal events happen.

1. Giving an usecase example:
=============================
When an application experiences packet loss due to an unreachable UDP
destination port, the kernel will send an exception message through the
icmp_send function. By adding a trace point for icmp_send, developers or
system administrators can obtain detailed information about the UDP
packet loss, including the type, code, source address, destination address,
source port, and destination port. This facilitates the trouble-shooting
of UDP packet loss issues especially for those network-service
applications.

2. Operation Instructions:
==========================
Switch to the tracing directory.
        cd /sys/kernel/tracing
Filter for destination port unreachable.
        echo "type==3 &amp;&amp; code==3" &gt; events/icmp/icmp_send/filter
Enable trace event.
        echo 1 &gt; events/icmp/icmp_send/enable

3. Result View:
================
 udp_client_erro-11370   [002] ...s.12   124.728002:
 icmp_send: icmp_send: type=3, code=3.
 From 127.0.0.1:41895 to 127.0.0.1:6666 ulen=23
 skbaddr=00000000589b167a

Signed-off-by: Peilin He &lt;he.peilin@zte.com.cn&gt;
Signed-off-by: xu xin &lt;xu.xin16@zte.com.cn&gt;
Reviewed-by: Yunkai Zhang &lt;zhang.yunkai@zte.com.cn&gt;
Cc: Yang Yang &lt;yang.yang29@zte.com.cn&gt;
Cc: Liu Chun &lt;liu.chun2@zte.com.cn&gt;
Cc: Xuexin Jiang &lt;jiang.xuexin@zte.com.cn&gt;
Reviewed-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
