Commit 1e650bb6 authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1779 from iovisor/yhs_dev

fix tcplife.py rewriter issue
parents eee383cf cb136c15
...@@ -311,8 +311,8 @@ TRACEPOINT_PROBE(sock, inet_sock_set_state) ...@@ -311,8 +311,8 @@ TRACEPOINT_PROBE(sock, inet_sock_set_state)
// get throughput stats. see tcp_get_info(). // get throughput stats. see tcp_get_info().
u64 rx_b = 0, tx_b = 0, sport = 0; u64 rx_b = 0, tx_b = 0, sport = 0;
struct tcp_sock *tp = (struct tcp_sock *)sk; struct tcp_sock *tp = (struct tcp_sock *)sk;
bpf_probe_read(&rx_b, sizeof(rx_b), &tp->bytes_received); rx_b = tp->bytes_received;
bpf_probe_read(&tx_b, sizeof(tx_b), &tp->bytes_acked); tx_b = tp->bytes_acked;
if (args->family == AF_INET) { if (args->family == AF_INET) {
struct ipv4_data_t data4 = {.span_us = delta_us, struct ipv4_data_t data4 = {.span_us = delta_us,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment