Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit c605889

Browse files
Chenghao ZhaoTreehugger Robot
authored andcommitted
ANDROID: GKI: net: add vendor hook to check if out of order occurs
1.android_vh_tcp_rcv_established_fast_path Check if there are received packets out of order for the fast path. 2.android_vh_tcp_rcv_established_slow_path Check if there are received packets out of order for the slow path. Bug: 378600969 Change-Id: Ifad16bd9523ac0c3cc0c0c98dfb0884635f3a537 Signed-off-by: Chenghao Zhao <[email protected]>
1 parent 7c12a8c commit c605889

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

drivers/android/vendor_hooks.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tcp_clean_rtx_queue);
387387
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tcp_rcv_synack);
388388
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_udp_unicast_rcv_skb);
389389
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_udp6_unicast_rcv_skb);
390+
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tcp_rcv_established_fast_path);
391+
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tcp_rcv_established_slow_path);
390392
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_try_to_unmap_one);
391393
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_rwsem_reader_owned);
392394
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_rwsem_reader_owned);

include/trace/hooks/net.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ DECLARE_HOOK(android_vh_udp_unicast_rcv_skb,
120120
DECLARE_HOOK(android_vh_udp6_unicast_rcv_skb,
121121
TP_PROTO(struct sk_buff *skb, struct sock *sk),
122122
TP_ARGS(skb, sk));
123+
DECLARE_HOOK(android_vh_tcp_rcv_established_fast_path,
124+
TP_PROTO(struct sock *sk), TP_ARGS(sk));
125+
DECLARE_HOOK(android_vh_tcp_rcv_established_slow_path,
126+
TP_PROTO(struct sock *sk), TP_ARGS(sk));
123127
/* macro versions of hooks are no longer required */
124128

125129
#endif /* _TRACE_HOOK_NET_VH_H */

net/ipv4/tcp_input.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6079,6 +6079,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
60796079

60806080
__tcp_ack_snd_check(sk, 0);
60816081
no_ack:
6082+
trace_android_vh_tcp_rcv_established_fast_path(sk);
60826083
if (eaten)
60836084
kfree_skb_partial(skb, fragstolen);
60846085
tcp_data_ready(sk);
@@ -6118,6 +6119,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
61186119

61196120
tcp_data_snd_check(sk);
61206121
tcp_ack_snd_check(sk);
6122+
6123+
trace_android_vh_tcp_rcv_established_slow_path(sk);
61216124
return;
61226125

61236126
csum_error:

0 commit comments

Comments
 (0)