Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'add-noinline_for_tracing-and-apply-it-to-tcp_drop_reason'

Yafang Shao says:

====================
Add noinline_for_tracing and apply it to tcp_drop_reason

This patchset introduces a new compiler annotation, noinline_for_tracing,
designed to prevent specific functions from being inlined to facilitate
tracing. In Patch #2, this annotation is applied to the tcp_drop_reason().
====================

Link: https://patch.msgid.link/20241024093742.87681-1-laoar.shao@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+8 -2
+6
include/linux/compiler_types.h
··· 266 266 #define noinline_for_stack noinline 267 267 268 268 /* 269 + * Use noinline_for_tracing for functions that should not be inlined. 270 + * For tracing reasons. 271 + */ 272 + #define noinline_for_tracing noinline 273 + 274 + /* 269 275 * Sanitizer helper attributes: Because using __always_inline and 270 276 * __no_sanitize_* conflict, provide helper attributes that will either expand 271 277 * to __no_sanitize_* in compilation units where instrumentation is enabled
+2 -2
net/ipv4/tcp_input.c
··· 4921 4921 return res; 4922 4922 } 4923 4923 4924 - static void tcp_drop_reason(struct sock *sk, struct sk_buff *skb, 4925 - enum skb_drop_reason reason) 4924 + noinline_for_tracing static void 4925 + tcp_drop_reason(struct sock *sk, struct sk_buff *skb, enum skb_drop_reason reason) 4926 4926 { 4927 4927 sk_drops_add(sk, skb); 4928 4928 sk_skb_reason_drop(sk, skb, reason);