netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT (commit: 23729ff23186424)
@ 2024-07-25 19:37 Rao Shoaib
  2024-07-26  3:29 ` Stanislav Fomichev
  0 siblings, 1 reply; 2+ messages in thread
From: Rao Shoaib @ 2024-07-25 19:37 UTC (permalink / raw)
  To: sdf, Eric Dumazet, priyarjha, ycheng, soheil, daniel; +Cc: netdev, bpf

Hi Stanislav,

I have a question about the placement of tcp_bpf_rtt() call in
tcp_rtt_estimator(). Why is the call made before the assignment

tp->srtt_us = max(1U, srtt);

How is the attached eBPF program suppose the get the new value?

Thanks,

Shoaib

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT (commit: 23729ff23186424)
  2024-07-25 19:37 bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT (commit: 23729ff23186424) Rao Shoaib
@ 2024-07-26  3:29 ` Stanislav Fomichev
  0 siblings, 0 replies; 2+ messages in thread
From: Stanislav Fomichev @ 2024-07-26  3:29 UTC (permalink / raw)
  To: Rao Shoaib
  Cc: sdf, Eric Dumazet, priyarjha, ycheng, soheil, daniel, netdev, bpf

On 07/25, Rao Shoaib wrote:
> Hi Stanislav,
> 
> I have a question about the placement of tcp_bpf_rtt() call in
> tcp_rtt_estimator(). Why is the call made before the assignment
> 
> tp->srtt_us = max(1U, srtt);
> 
> How is the attached eBPF program suppose the get the new value?

Take a look at the way tcp_bpf_rtt is invoked. It gets mrtt_us
and srtt arguments. Those are passed via bpf_sock_ops args field.
See tools/testing/selftests/bpf/progs/tcp_rtt.c. Hope that helps!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-26  3:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 19:37 bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT (commit: 23729ff23186424) Rao Shoaib
2024-07-26  3:29 ` Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).