Re: [PATCH bpf-next v2 3/6] net: remove duplicate reuseport_lookup functions
From: Lorenz Bauer
Date: Wed Jun 21 2023 - 04:01:34 EST
On Tue, Jun 20, 2023 at 7:31 PM Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> wrote:
>
> Good point. This is based on an assumption that all SO_REUSEPORT
> sockets have the same score, which is wrong for two corner cases
> if reuseport_has_conns() == true :
>
> 1) SO_INCOMING_CPU is set
> -> selected sk might have +1 score
>
> 2) BPF prog returns ESTABLISHED and/or SO_INCOMING_CPU sk
> -> selected sk will have more than 8
>
> Using the old score could trigger more lookups depending on the
> order that sockets are created.
So the result will still be correct, but it's less performant? Happy
to fix a perf regression, but if the result is incorrect this might
need a separate fix?
Best
Lorenz