mbox series

[bpf-next,0/2] Fix BPF socket lookup with reuseport groups with connections

Message ID 20200722161720.940831-1-jakub@cloudflare.com
Headers show
Series Fix BPF socket lookup with reuseport groups with connections | expand

Message

Jakub Sitnicki July 22, 2020, 4:17 p.m. UTC
This mini series contains a fix for a bug noticed when analyzing a reported
merge conflict between bpf-next and net tree [0].

Apart from fixing a corner-case that affects use of BPF sk_lookup in tandem
with UDP reuseport groups with connected sockets, it should make the
conflict resolution with net tree easier.

These changes don't replicate the improved UDP socket lookup behavior from
net tree, where commit efc6b6f6c311 ("udp: Improve load balancing for
SO_REUSEPORT.") is present.

Happy to do it as a follow up. For the moment I didn't want to make things
more confusing when it comes to what got fixed where and why.

Thanks,
-jkbs

Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>

[0] https://lore.kernel.org/linux-next/20200722132143.700a5ccc@canb.auug.org.au/

Jakub Sitnicki (2):
  udp: Don't discard reuseport selection when group has connections
  selftests/bpf: Test BPF socket lookup and reuseport with connections

 net/ipv4/udp.c                                |  5 +-
 net/ipv6/udp.c                                |  5 +-
 .../selftests/bpf/prog_tests/sk_lookup.c      | 54 ++++++++++++++++++-
 3 files changed, 55 insertions(+), 9 deletions(-)

Comments

Kuniyuki Iwashima July 22, 2020, 4:59 p.m. UTC | #1
From:   Jakub Sitnicki <jakub@cloudflare.com>
Date:   Wed, 22 Jul 2020 18:17:18 +0200
> This mini series contains a fix for a bug noticed when analyzing a reported
> merge conflict between bpf-next and net tree [0].
> 
> Apart from fixing a corner-case that affects use of BPF sk_lookup in tandem
> with UDP reuseport groups with connected sockets, it should make the
> conflict resolution with net tree easier.
> 
> These changes don't replicate the improved UDP socket lookup behavior from
> net tree, where commit efc6b6f6c311 ("udp: Improve load balancing for
> SO_REUSEPORT.") is present.
> 
> Happy to do it as a follow up. For the moment I didn't want to make things
> more confusing when it comes to what got fixed where and why.
> 
> Thanks,
> -jkbs

Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>

Thank you.
Alexei Starovoitov July 23, 2020, 5:15 a.m. UTC | #2
On Wed, Jul 22, 2020 at 9:59 AM Kuniyuki Iwashima <kuniyu@amazon.co.jp> wrote:
>
> From:   Jakub Sitnicki <jakub@cloudflare.com>
> Date:   Wed, 22 Jul 2020 18:17:18 +0200
> > This mini series contains a fix for a bug noticed when analyzing a reported
> > merge conflict between bpf-next and net tree [0].
> >
> > Apart from fixing a corner-case that affects use of BPF sk_lookup in tandem
> > with UDP reuseport groups with connected sockets, it should make the
> > conflict resolution with net tree easier.
> >
> > These changes don't replicate the improved UDP socket lookup behavior from
> > net tree, where commit efc6b6f6c311 ("udp: Improve load balancing for
> > SO_REUSEPORT.") is present.
> >
> > Happy to do it as a follow up. For the moment I didn't want to make things
> > more confusing when it comes to what got fixed where and why.
> >
> > Thanks,
> > -jkbs
>
> Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>

Applied to bpf-next. Thanks