On Thu, Mar 18, 2021 at 5:09 AM Alexander Lobakin <aloba...@pm.me> wrote:
> Regarding that both {tcp,udp}_bpf_update_proto() is global and
> for now they are the only two implemented callbacks, wouldn't it
> be worthy to straighten the calls here? Like
>
>         return INDIRECT_CALL_2(sk->sk_prot->psock_update_sk_prot,
>                                tcp_bpf_update_proto,
>                                udp_bpf_update_proto,
>                                sk, false);

I get your point, but AF_UNIX will implement this in the next patchset,
and my colleague is working on vsock support too, so it will go beyond
INET very soon.

>
> (the same in sk_psock_restore_proto() then)
>
> Or this code path is not performance-critical?

It is not on the hot path, updating proto happens when we insert
the socket to the map or remove it from there.

Thanks.

Reply via email to