Skip to contentSkip to conversation

udp6: add a missing call into udp_fail_queue_rcv_skb tracepoint

PATCH Applied Ivan Babrou 3 participants 3 messages Jul 7, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 udp6: add a missing call into udp_fail_queue_rcv_skb tracepoint

The tracepoint has existed for 12 years, but it only covered udp over the legacy IPv4 protocol. Having it enabled for udp6 removes the unnecessary difference in error visibility.

Fixes 296f7ea75b45 ("udp: add tracepoints for queueing skb to rcvbuf")

---
v2: added tracepoint export to make it build with IPV6=m (thanks Jakub!)

---
 net/core/net-traces.c | 2 ++
 net/ipv6/udp.c        | 2 ++
 2 files changed, 4 insertions(+)
net/core/net-traces.c +2 -0
index 805b7385dd8d..6aef976bc1da 100644
@@ -63,4 +63,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(napi_poll);
 EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_send_reset);
 EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_bad_csum);
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(udp_fail_queue_rcv_skb);
+
 EXPORT_TRACEPOINT_SYMBOL_GPL(sk_data_ready);
net/ipv6/udp.c +2 -0
index e5a337e6b970..debb98fb23c0 100644
@@ -45,6 +45,7 @@
 #include <net/tcp_states.h>
 #include <net/ip6_checksum.h>
 #include <net/ip6_tunnel.h>
+#include <trace/events/udp.h>
 #include <net/xfrm.h>
 #include <net/inet_hashtables.h>
 #include <net/inet6_hashtables.h>
@@ -680,6 +681,7 @@ static int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
 		}
 		UDP6_INC_STATS(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
 		kfree_skb_reason(skb, drop_reason);
+		trace_udp_fail_queue_rcv_skb(rc, sk);
 		return -1;
 	}
 
Signature · 1 line
2.41.0
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Ivan Babrou

The tracepoint has existed for 12 years, but it only covered udp over the legacy IPv4 protocol. Having it enabled for udp6 removes the unnecessary difference in error visibility.

Fixes 296f7ea75b45 ("udp: add tracepoints for queueing skb to rcvbuf")

Since I raised a question on V1, I was actually satisfied by the answer and likely some other net maintainer will pick this patch before myself:

#2 lore raw
In reply to Ivan Babrou
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Thu, 6 Jul 2023 21:39:20 -0700 you wrote:

The tracepoint has existed for 12 years, but it only covered udp over the legacy IPv4 protocol. Having it enabled for udp6 removes the unnecessary difference in error visibility.

Fixes 296f7ea75b45 ("udp: add tracepoints for queueing skb to rcvbuf")

[...]

Here is the summary with links:
- [v2] udp6: add a missing call into udp_fail_queue_rcv_skb tracepoint

    https://git.kernel.org/netdev/net/c/8139dccd464a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html