Re: [PATCH bpf-next v4 6/7] bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign

From: Lorenz Bauer
Date: Mon Jul 03 2023 - 06:01:54 EST


On Wed, Jun 28, 2023 at 7:50 PM Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> wrote:

> > + } else {
> > + return sk;
> > + }
> > +
> > + reuse_sk = inet6_lookup_reuseport(net, sk, skb, doff,
> > + saddr, sport, daddr, ntohs(dport),
> > + ehashfn);
> > + if (!reuse_sk || reuse_sk == sk)
>
> nit: compiler might have optimised though, given here is the fast path,
> we can save reuse_sk == sk check.

Ack.