* [PATCH bpf-next] udp: reduce merge conflict on udp[46]_lib_lookup2
@ 2020-07-25 2:54 Willem de Bruijn
2020-07-25 10:58 ` Kuniyuki Iwashima
0 siblings, 1 reply; 3+ messages in thread
From: Willem de Bruijn @ 2020-07-25 2:54 UTC (permalink / raw)
To: netdev; +Cc: bpf, ast, daniel, jakub, kuniyu, davem, kuba, Willem de Bruijn
From: Willem de Bruijn <willemb@google.com>
Commit efc6b6f6c311 ("udp: Improve load balancing for SO_REUSEPORT.")
in net conflicts with
Commit 72f7e9440e9b ("udp: Run SK_LOOKUP BPF program on socket lookup")
in bpf-next.
Commit 4a0e87bb1836 ("udp: Don't discard reuseport selection when group
has connections")
also in bpf-next reduces the conflict.
Further simplify by applying the main change of the first commit to
bpf-next. After this a conflict remains, but the bpf-next side can be
taken as is.
Now unused variable reuseport_result added in net must also be
removed. That applies without a conflict, so is harder to spot.
Link: http://patchwork.ozlabs.org/project/netdev/patch/20200722165227.51046-1-kuniyu@amazon.co.jp/
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
net/ipv4/udp.c | 3 ++-
net/ipv6/udp.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 9397690b3737..67f8e880d7f3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -448,7 +448,8 @@ static struct sock *udp4_lib_lookup2(struct net *net,
return result;
badness = score;
- result = sk;
+ if (!result)
+ result = sk;
}
}
return result;
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index ed282b0fe8ac..827a01b50b9b 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -180,8 +180,9 @@ static struct sock *udp6_lib_lookup2(struct net *net,
if (result && !reuseport_has_conns(sk, false))
return result;
- result = sk;
badness = score;
+ if (!result)
+ result = sk;
}
}
return result;
--
2.28.0.rc0.142.g3c755180ce-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] udp: reduce merge conflict on udp[46]_lib_lookup2
2020-07-25 2:54 [PATCH bpf-next] udp: reduce merge conflict on udp[46]_lib_lookup2 Willem de Bruijn
@ 2020-07-25 10:58 ` Kuniyuki Iwashima
2020-07-26 1:01 ` Alexei Starovoitov
0 siblings, 1 reply; 3+ messages in thread
From: Kuniyuki Iwashima @ 2020-07-25 10:58 UTC (permalink / raw)
To: willemdebruijn.kernel
Cc: ast, bpf, daniel, davem, jakub, kuba, kuniyu, netdev, willemb
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Fri, 24 Jul 2020 22:54:57 -0400
> From: Willem de Bruijn <willemb@google.com>
>
> Commit efc6b6f6c311 ("udp: Improve load balancing for SO_REUSEPORT.")
>
> in net conflicts with
>
> Commit 72f7e9440e9b ("udp: Run SK_LOOKUP BPF program on socket lookup")
>
> in bpf-next.
>
> Commit 4a0e87bb1836 ("udp: Don't discard reuseport selection when group
> has connections")
>
> also in bpf-next reduces the conflict.
>
> Further simplify by applying the main change of the first commit to
> bpf-next. After this a conflict remains, but the bpf-next side can be
> taken as is.
>
> Now unused variable reuseport_result added in net must also be
> removed. That applies without a conflict, so is harder to spot.
>
> Link: http://patchwork.ozlabs.org/project/netdev/patch/20200722165227.51046-1-kuniyu@amazon.co.jp/
> Signed-off-by: Willem de Bruijn <willemb@google.com>
Thank you for the follow up patch!
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Best Regards,
Kuniyuki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] udp: reduce merge conflict on udp[46]_lib_lookup2
2020-07-25 10:58 ` Kuniyuki Iwashima
@ 2020-07-26 1:01 ` Alexei Starovoitov
0 siblings, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2020-07-26 1:01 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: Willem de Bruijn, Alexei Starovoitov, bpf, Daniel Borkmann,
David S. Miller, Jakub Sitnicki, Jakub Kicinski,
Network Development, Willem de Bruijn
On Sat, Jul 25, 2020 at 3:58 AM Kuniyuki Iwashima <kuniyu@amazon.co.jp> wrote:
>
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Date: Fri, 24 Jul 2020 22:54:57 -0400
> > From: Willem de Bruijn <willemb@google.com>
> >
> > Commit efc6b6f6c311 ("udp: Improve load balancing for SO_REUSEPORT.")
> >
> > in net conflicts with
> >
> > Commit 72f7e9440e9b ("udp: Run SK_LOOKUP BPF program on socket lookup")
> >
> > in bpf-next.
> >
> > Commit 4a0e87bb1836 ("udp: Don't discard reuseport selection when group
> > has connections")
> >
> > also in bpf-next reduces the conflict.
> >
> > Further simplify by applying the main change of the first commit to
> > bpf-next. After this a conflict remains, but the bpf-next side can be
> > taken as is.
> >
> > Now unused variable reuseport_result added in net must also be
> > removed. That applies without a conflict, so is harder to spot.
> >
> > Link: http://patchwork.ozlabs.org/project/netdev/patch/20200722165227.51046-1-kuniyu@amazon.co.jp/
> > Signed-off-by: Willem de Bruijn <willemb@google.com>
>
> Thank you for the follow up patch!
>
> Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
net is being merged into net-next. I think this one is no longer necessary.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-26 1:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 2:54 [PATCH bpf-next] udp: reduce merge conflict on udp[46]_lib_lookup2 Willem de Bruijn
2020-07-25 10:58 ` Kuniyuki Iwashima
2020-07-26 1:01 ` Alexei Starovoitov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.