From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EF976BFC0; Tue, 7 May 2024 09:09:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072963; cv=none; b=XfaNe3/xzzr7IZMRqK/2TDGgB3QlwewDolSed2LD52hVvfUNuvHs1lhjZf8yVd73/FgQsy/6SnXn2ndKzugOIn1OEhphLYzXD84VOD3t8athG7ZEsmw89sJ+JwChzh9zEoPPuivH5+DVtwCVAgkVsWicUc7p81x30q7BnZDXrkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072963; c=relaxed/simple; bh=0L9VIcNji6Ae28xW1QP08XAInwJIp5n5Epon4SaYRxY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qHdLsDAQX5qqqZ1Q9Vi7HK4pwR8YN6+9VXEz70dZ2bJVluZSHEzg4NucqLPFF4LLDDVJV8iVHaoXjAGZi+JcMBIslNfWzEf81wDvdUP4xYftC2Re999HLACjA2UM5nJ3gKOdAODyiKPfbowgC3n5iIiLMImshzHHNa9gBa+jjVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49A7BC2BBFC; Tue, 7 May 2024 09:09:20 +0000 (UTC) Date: Tue, 7 May 2024 05:09:17 -0400 From: Steven Rostedt To: Cc: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v9] net/ipv4: add tracepoint for icmp_send Message-ID: <20240507050917.238a0891@rorschach.local.home> In-Reply-To: <202405071541038433DpxXxFl-a_4XcQGTy_BU@zte.com.cn> References: <202405071541038433DpxXxFl-a_4XcQGTy_BU@zte.com.cn> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 7 May 2024 15:41:03 +0800 (CST) wrote: > From: Peilin He >=20 > Introduce a tracepoint for icmp_send, which can help users to get more > detail information conveniently when icmp abnormal events happen. >=20 > 1. Giving an usecase example: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > 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 addres= s, > source port, and destination port. This facilitates the trouble-shooting > of UDP packet loss issues especially for those network-service > applications. >=20 > 2. Operation Instructions: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > Switch to the tracing directory. > cd /sys/kernel/tracing > Filter for destination port unreachable. > echo "type=3D=3D3 && code=3D=3D3" > events/icmp/icmp_send/filter > Enable trace event. > echo 1 > events/icmp/icmp_send/enable >=20 > 3. Result View: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > udp_client_erro-11370 [002] ...s.12 124.728002: > icmp_send: icmp_send: type=3D3, code=3D3. > From 127.0.0.1:41895 to 127.0.0.1:6666 ulen=3D23 > skbaddr=3D00000000589b167a >=20 > Signed-off-by: Peilin He > Signed-off-by: xu xin > Reviewed-by: Yunkai Zhang > Cc: Yang Yang > Cc: Liu Chun > Cc: Xuexin Jiang > --- =46rom just a tracing point of view: Reviewed-by: Steven Rostedt (Google) -- Steve