diff options
| author | Yafang Shao <[email protected]> | 2024-10-24 09:37:42 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-11-03 17:02:32 +0000 |
| commit | dbd5e2e79ed8653ac2ae255e42d1189283343a0c (patch) | |
| tree | b3979986a79b2255d2c40949a035792ba087d576 /net/ipv4/tcp_input.c | |
| parent | compiler_types: Add noinline_for_tracing annotation (diff) | |
| download | kernel-dbd5e2e79ed8653ac2ae255e42d1189283343a0c.tar.gz kernel-dbd5e2e79ed8653ac2ae255e42d1189283343a0c.zip | |
net: tcp: Add noinline_for_tracing annotation for tcp_drop_reason()
We previously hooked the tcp_drop_reason() function using BPF to monitor
TCP drop reasons. However, after upgrading our compiler from GCC 9 to GCC
11, tcp_drop_reason() is now inlined, preventing us from hooking into it.
To address this, it would be beneficial to make noinline explicitly for
tracing.
Link: https://lore.kernel.org/netdev/CANn89iJuShCmidCi_ZkYABtmscwbVjhuDta1MS5LxV_4H9tKOA@mail.gmail.com/
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Yafang Shao <[email protected]>
Cc: Menglong Dong <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2d844e1f867f..5bdf13ac26ef 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4921,8 +4921,8 @@ static bool tcp_ooo_try_coalesce(struct sock *sk, return res; } -static void tcp_drop_reason(struct sock *sk, struct sk_buff *skb, - enum skb_drop_reason reason) +noinline_for_tracing static void +tcp_drop_reason(struct sock *sk, struct sk_buff *skb, enum skb_drop_reason reason) { sk_drops_add(sk, skb); sk_skb_reason_drop(sk, skb, reason); |
