projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e86b9e
)
tcptop: Filter out negative values in receive probe
author
Benjamin Poirier
<benjamin.poirier@gmail.com>
Fri, 28 Jul 2017 20:25:14 +0000
(13:25 -0700)
committer
Brenden Blanco
<bblanco@gmail.com>
Fri, 11 Aug 2017 14:54:03 +0000
(07:54 -0700)
When tcp_cleanup_rbuf() is called from tcp_recvmsg(), "copied" may be an
error code, especially -EAGAIN for non-blocking receives.
tools/tcptop.py
patch
|
blob
|
history
diff --git
a/tools/tcptop.py
b/tools/tcptop.py
index
0f9ead6
..
9ca10f6
100755
(executable)
--- a/
tools/tcptop.py
+++ b/
tools/tcptop.py
@@
-148,6
+148,9
@@
int kprobe__tcp_cleanup_rbuf(struct pt_regs *ctx, struct sock *sk, int copied)
u16 dport = 0, family = sk->__sk_common.skc_family;
u64 *val, zero = 0;
+ if (copied <= 0)
+ return 0;
+
if (family == AF_INET) {
struct ipv4_key_t ipv4_key = {.pid = pid};
ipv4_key.saddr = sk->__sk_common.skc_rcv_saddr;