Skip to content

Commit c255796

Browse files
authored
Merge pull request #1391 from hzxuzhonghu/fix-sent-bytes
use bytes_acked instead of delivered to get the sent bytes, it is acc…
2 parents 410c184 + 3f0912e commit c255796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpf/kmesh/probes/tcp_probe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline void construct_tuple(struct bpf_sock *sk, struct bpf_sock_tuple *t
9999

100100
static inline void get_tcp_probe_info(struct bpf_tcp_sock *tcp_sock, struct tcp_probe_info *info)
101101
{
102-
info->sent_bytes = tcp_sock->delivered;
102+
info->sent_bytes = tcp_sock->bytes_acked; // bytes_acked means already acked sent bytes
103103
info->received_bytes = tcp_sock->bytes_received;
104104
info->srtt_us = tcp_sock->srtt_us;
105105
info->rtt_min = tcp_sock->rtt_min;

0 commit comments

Comments
 (0)