[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8b54ef5-8a24-5886-8f4e-8856dbaa9c34@iogearbox.net>
Date: Fri, 17 Mar 2023 18:23:11 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Kui-Feng Lee <kuifeng@...a.com>, bpf@...r.kernel.org,
ast@...nel.org, song@...nel.org, kernel-team@...a.com,
andrii@...nel.org, sdf@...gle.com
Subject: Re: [PATCH bpf-next v7 2/8] net: Update an existing TCP congestion
control algorithm.
On 3/17/23 6:18 PM, Martin KaFai Lau wrote:
> On 3/17/23 8:23 AM, Daniel Borkmann wrote:
>> From the function itself what is not clear whether
>> callers that replace an existing one should do the synchronize_rcu() themselves or if this should
>> be part of tcp_update_congestion_control?
>
> bpf_struct_ops_map_free (in patch 1) also does synchronize_rcu() for another reason (bpf_setsockopt), so the caller (bpf_struct_ops) is doing it. From looking at tcp_unregister_congestion_control(), make sense that it is more correct to have another synchronize_rcu() also in tcp_update_congestion_control in case there will be other non bpf_struct_ops caller doing update in the future.
Agree, I was looking at 'bpf: Update the struct_ops of a bpf_link', and essentially as-is
it was implicit via map free. +1, tcp_update_congestion_control() would be more obvious and
better for other/non-BPF users.
Thanks,
Daniel
Powered by blists - more mailing lists