On Tue, Jun 20, 2023 at 7:31 PM Kuniyuki Iwashima kuniyu@amazon.com 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 :
SO_INCOMING_CPU is set -> selected sk might have +1 score
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