bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup
@ 2019-05-31 22:29 Martin KaFai Lau
  2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Martin KaFai Lau @ 2019-05-31 22:29 UTC (permalink / raw)
  To: bpf, netdev
  Cc: Alexei Starovoitov, Daniel Borkmann, David Miller, kernel-team

This series has fixes when running reuseport's bpf_prog for udp lookup.
If there is reuseport's bpf_prog, the common issue is the reuseport code
path expects skb->data pointing to the transport header (udphdr here).
A couple of commits broke this expectation.  The issue is specific
to running bpf_prog, so bpf tag is used for this series.

Please refer to the individual commit message for details.

Martin KaFai Lau (2):
  bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err
  bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro

 net/ipv4/udp.c | 6 +++++-
 net/ipv6/udp.c | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err
  2019-05-31 22:29 [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Martin KaFai Lau
@ 2019-05-31 22:29 ` Martin KaFai Lau
  2019-06-01 23:54   ` Song Liu
  2019-06-03 13:07   ` Craig Gallek
  2019-05-31 22:29 ` [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro Martin KaFai Lau
  2019-06-03 20:42 ` [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Alexei Starovoitov
  2 siblings, 2 replies; 9+ messages in thread
From: Martin KaFai Lau @ 2019-05-31 22:29 UTC (permalink / raw)
  To: bpf, netdev
  Cc: Alexei Starovoitov, Daniel Borkmann, David Miller, kernel-team,
	Craig Gallek

__udp6_lib_err() may be called when handling icmpv6 message. For example,
the icmpv6 toobig(type=2).  __udp6_lib_lookup() is then called
which may call reuseport_select_sock().  reuseport_select_sock() will
call into a bpf_prog (if there is one).

reuseport_select_sock() is expecting the skb->data pointing to the
transport header (udphdr in this case).  For example, run_bpf_filter()
is pulling the transport header.

However, in the __udp6_lib_err() path, the skb->data is pointing to the
ipv6hdr instead of the udphdr.

One option is to pull and push the ipv6hdr in __udp6_lib_err().
Instead of doing this, this patch follows how the original
commit 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
was done in IPv4, which has passed a NULL skb pointer to
reuseport_select_sock().

Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
Cc: Craig Gallek <kraig@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
 net/ipv6/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 07fa579dfb96..133e6370f89c 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -515,7 +515,7 @@ int __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 	struct net *net = dev_net(skb->dev);
 
 	sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source,
-			       inet6_iif(skb), inet6_sdif(skb), udptable, skb);
+			       inet6_iif(skb), inet6_sdif(skb), udptable, NULL);
 	if (!sk) {
 		/* No socket for error: try tunnels before discarding */
 		sk = ERR_PTR(-ENOENT);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
  2019-05-31 22:29 [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Martin KaFai Lau
  2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
@ 2019-05-31 22:29 ` Martin KaFai Lau
  2019-06-01 23:54   ` Song Liu
  2019-06-03 20:42 ` [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Alexei Starovoitov
  2 siblings, 1 reply; 9+ messages in thread
From: Martin KaFai Lau @ 2019-05-31 22:29 UTC (permalink / raw)
  To: bpf, netdev
  Cc: Alexei Starovoitov, Daniel Borkmann, David Miller, kernel-team,
	Tom Herbert

When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
the reuseport_select_sock() assumption that skb->data is pointing
to the transport header.

This patch follows an earlier __udp6_lib_err() fix by
passing a NULL skb to avoid calling the reuseport's bpf_prog.

Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
 net/ipv4/udp.c | 6 +++++-
 net/ipv6/udp.c | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 8fb250ed53d4..85db0e3d7f3f 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -503,7 +503,11 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
 struct sock *udp4_lib_lookup_skb(struct sk_buff *skb,
 				 __be16 sport, __be16 dport)
 {
-	return __udp4_lib_lookup_skb(skb, sport, dport, &udp_table);
+	const struct iphdr *iph = ip_hdr(skb);
+
+	return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport,
+				 iph->daddr, dport, inet_iif(skb),
+				 inet_sdif(skb), &udp_table, NULL);
 }
 EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
 
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 133e6370f89c..4e52c37bb836 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -243,7 +243,7 @@ struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
 
 	return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
 				 &iph->daddr, dport, inet6_iif(skb),
-				 inet6_sdif(skb), &udp_table, skb);
+				 inet6_sdif(skb), &udp_table, NULL);
 }
 EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
  2019-05-31 22:29 ` [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro Martin KaFai Lau
@ 2019-06-01 23:54   ` Song Liu
  2019-06-02  1:09     ` Martin Lau
  0 siblings, 1 reply; 9+ messages in thread
From: Song Liu @ 2019-06-01 23:54 UTC (permalink / raw)
  To: Martin Lau
  Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
	David Miller, Kernel Team, Tom Herbert



> On May 31, 2019, at 3:29 PM, Martin KaFai Lau <kafai@fb.com> wrote:
> 
> When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
> added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
> the reuseport_select_sock() assumption that skb->data is pointing
> to the transport header.
> 
> This patch follows an earlier __udp6_lib_err() fix by
> passing a NULL skb to avoid calling the reuseport's bpf_prog.
> 
> Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
> Cc: Tom Herbert <tom@herbertland.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> ---
> net/ipv4/udp.c | 6 +++++-
> net/ipv6/udp.c | 2 +-
> 2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 8fb250ed53d4..85db0e3d7f3f 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -503,7 +503,11 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
> struct sock *udp4_lib_lookup_skb(struct sk_buff *skb,
> 				 __be16 sport, __be16 dport)
> {
> -	return __udp4_lib_lookup_skb(skb, sport, dport, &udp_table);
> +	const struct iphdr *iph = ip_hdr(skb);
> +
> +	return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport,
> +				 iph->daddr, dport, inet_iif(skb),
> +				 inet_sdif(skb), &udp_table, NULL);

I think we can now remove the last argument of __udp4_lib_lookup()?


> }
> EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
> 
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 133e6370f89c..4e52c37bb836 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -243,7 +243,7 @@ struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
> 
> 	return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
> 				 &iph->daddr, dport, inet6_iif(skb),
> -				 inet6_sdif(skb), &udp_table, skb);
> +				 inet6_sdif(skb), &udp_table, NULL);
> }
> EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
> 
> -- 
> 2.17.1
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err
  2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
@ 2019-06-01 23:54   ` Song Liu
  2019-06-03 13:07   ` Craig Gallek
  1 sibling, 0 replies; 9+ messages in thread
From: Song Liu @ 2019-06-01 23:54 UTC (permalink / raw)
  To: Martin Lau
  Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
	David Miller, Kernel Team, Craig Gallek



> On May 31, 2019, at 3:29 PM, Martin KaFai Lau <kafai@fb.com> wrote:
> 
> __udp6_lib_err() may be called when handling icmpv6 message. For example,
> the icmpv6 toobig(type=2).  __udp6_lib_lookup() is then called
> which may call reuseport_select_sock().  reuseport_select_sock() will
> call into a bpf_prog (if there is one).
> 
> reuseport_select_sock() is expecting the skb->data pointing to the
> transport header (udphdr in this case).  For example, run_bpf_filter()
> is pulling the transport header.
> 
> However, in the __udp6_lib_err() path, the skb->data is pointing to the
> ipv6hdr instead of the udphdr.
> 
> One option is to pull and push the ipv6hdr in __udp6_lib_err().
> Instead of doing this, this patch follows how the original
> commit 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
> was done in IPv4, which has passed a NULL skb pointer to
> reuseport_select_sock().
> 
> Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
> Cc: Craig Gallek <kraig@google.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>

Acked-by: Song Liu <songliubraving@fb.com>

> ---
> net/ipv6/udp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 07fa579dfb96..133e6370f89c 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -515,7 +515,7 @@ int __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> 	struct net *net = dev_net(skb->dev);
> 
> 	sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source,
> -			       inet6_iif(skb), inet6_sdif(skb), udptable, skb);
> +			       inet6_iif(skb), inet6_sdif(skb), udptable, NULL);
> 	if (!sk) {
> 		/* No socket for error: try tunnels before discarding */
> 		sk = ERR_PTR(-ENOENT);
> -- 
> 2.17.1
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
  2019-06-01 23:54   ` Song Liu
@ 2019-06-02  1:09     ` Martin Lau
  2019-06-02  7:05       ` Song Liu
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Lau @ 2019-06-02  1:09 UTC (permalink / raw)
  To: Song Liu
  Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
	David Miller, Kernel Team, Tom Herbert

On Sat, Jun 01, 2019 at 04:54:46PM -0700, Song Liu wrote:
> 
> 
> > On May 31, 2019, at 3:29 PM, Martin KaFai Lau <kafai@fb.com> wrote:
> > 
> > When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
> > added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
> > the reuseport_select_sock() assumption that skb->data is pointing
> > to the transport header.
> > 
> > This patch follows an earlier __udp6_lib_err() fix by
> > passing a NULL skb to avoid calling the reuseport's bpf_prog.
> > 
> > Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
> > Cc: Tom Herbert <tom@herbertland.com>
> > Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> > ---
> > net/ipv4/udp.c | 6 +++++-
> > net/ipv6/udp.c | 2 +-
> > 2 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> > index 8fb250ed53d4..85db0e3d7f3f 100644
> > --- a/net/ipv4/udp.c
> > +++ b/net/ipv4/udp.c
> > @@ -503,7 +503,11 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
Note that this patch is changing the below "udp4_lib_lookup_skb()"
instead of the above "__udp4_lib_lookup_skb()".

> > struct sock *udp4_lib_lookup_skb(struct sk_buff *skb,
> > 				 __be16 sport, __be16 dport)
> > {
> > -	return __udp4_lib_lookup_skb(skb, sport, dport, &udp_table);
> > +	const struct iphdr *iph = ip_hdr(skb);
> > +
> > +	return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport,
> > +				 iph->daddr, dport, inet_iif(skb),
> > +				 inet_sdif(skb), &udp_table, NULL);
> 
> I think we can now remove the last argument of __udp4_lib_lookup()?
The last arg of __udp4_lib_lookup() is skb.
__udp4_lib_lookup_skb(), which is not changed in this patch, is still
calling __udp4_lib_lookup() with a skb and the skb is used by the
reuseport's bpf_prog.  Hence, it cannot be removed.

> 
> 
> > }
> > EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
> > 
> > diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> > index 133e6370f89c..4e52c37bb836 100644
> > --- a/net/ipv6/udp.c
> > +++ b/net/ipv6/udp.c
> > @@ -243,7 +243,7 @@ struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
> > 
> > 	return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
> > 				 &iph->daddr, dport, inet6_iif(skb),
> > -				 inet6_sdif(skb), &udp_table, skb);
> > +				 inet6_sdif(skb), &udp_table, NULL);
> > }
> > EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
> > 
> > -- 
> > 2.17.1
> > 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
  2019-06-02  1:09     ` Martin Lau
@ 2019-06-02  7:05       ` Song Liu
  0 siblings, 0 replies; 9+ messages in thread
From: Song Liu @ 2019-06-02  7:05 UTC (permalink / raw)
  To: Martin Lau
  Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
	David Miller, Kernel Team, Tom Herbert



> On Jun 1, 2019, at 6:09 PM, Martin Lau <kafai@fb.com> wrote:
> 
> On Sat, Jun 01, 2019 at 04:54:46PM -0700, Song Liu wrote:
>> 
>> 
>>> On May 31, 2019, at 3:29 PM, Martin KaFai Lau <kafai@fb.com> wrote:
>>> 
>>> When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
>>> added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
>>> the reuseport_select_sock() assumption that skb->data is pointing
>>> to the transport header.
>>> 
>>> This patch follows an earlier __udp6_lib_err() fix by
>>> passing a NULL skb to avoid calling the reuseport's bpf_prog.
>>> 
>>> Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
>>> Cc: Tom Herbert <tom@herbertland.com>
>>> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
>>> ---
>>> net/ipv4/udp.c | 6 +++++-
>>> net/ipv6/udp.c | 2 +-
>>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
>>> index 8fb250ed53d4..85db0e3d7f3f 100644
>>> --- a/net/ipv4/udp.c
>>> +++ b/net/ipv4/udp.c
>>> @@ -503,7 +503,11 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
> Note that this patch is changing the below "udp4_lib_lookup_skb()"
> instead of the above "__udp4_lib_lookup_skb()".
> 
>>> struct sock *udp4_lib_lookup_skb(struct sk_buff *skb,
>>> 				 __be16 sport, __be16 dport)
>>> {
>>> -	return __udp4_lib_lookup_skb(skb, sport, dport, &udp_table);
>>> +	const struct iphdr *iph = ip_hdr(skb);
>>> +
>>> +	return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport,
>>> +				 iph->daddr, dport, inet_iif(skb),
>>> +				 inet_sdif(skb), &udp_table, NULL);
>> 
>> I think we can now remove the last argument of __udp4_lib_lookup()?
> The last arg of __udp4_lib_lookup() is skb.
> __udp4_lib_lookup_skb(), which is not changed in this patch, is still
> calling __udp4_lib_lookup() with a skb and the skb is used by the
> reuseport's bpf_prog.  Hence, it cannot be removed.

I see. I somehow missed this path. Thanks for the explanation. 

Acked-by: Song Liu <songliubraving@fb.com>

> 
>> 
>> 
>>> }
>>> EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
>>> 
>>> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
>>> index 133e6370f89c..4e52c37bb836 100644
>>> --- a/net/ipv6/udp.c
>>> +++ b/net/ipv6/udp.c
>>> @@ -243,7 +243,7 @@ struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
>>> 
>>> 	return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
>>> 				 &iph->daddr, dport, inet6_iif(skb),
>>> -				 inet6_sdif(skb), &udp_table, skb);
>>> +				 inet6_sdif(skb), &udp_table, NULL);
>>> }
>>> EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
>>> 
>>> -- 
>>> 2.17.1
>>> 
>> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err
  2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
  2019-06-01 23:54   ` Song Liu
@ 2019-06-03 13:07   ` Craig Gallek
  1 sibling, 0 replies; 9+ messages in thread
From: Craig Gallek @ 2019-06-03 13:07 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: bpf, netdev, Alexei Starovoitov, Daniel Borkmann, David Miller,
	Kernel Team

On Fri, May 31, 2019 at 6:29 PM Martin KaFai Lau <kafai@fb.com> wrote:
>
> __udp6_lib_err() may be called when handling icmpv6 message. For example,
> the icmpv6 toobig(type=2).  __udp6_lib_lookup() is then called
> which may call reuseport_select_sock().  reuseport_select_sock() will
> call into a bpf_prog (if there is one).
>
> reuseport_select_sock() is expecting the skb->data pointing to the
> transport header (udphdr in this case).  For example, run_bpf_filter()
> is pulling the transport header.
>
> However, in the __udp6_lib_err() path, the skb->data is pointing to the
> ipv6hdr instead of the udphdr.
>
> One option is to pull and push the ipv6hdr in __udp6_lib_err().
> Instead of doing this, this patch follows how the original
> commit 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
> was done in IPv4, which has passed a NULL skb pointer to
> reuseport_select_sock().
>
> Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
> Cc: Craig Gallek <kraig@google.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>

Acked-by: Craig Gallek <kraig@google.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup
  2019-05-31 22:29 [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Martin KaFai Lau
  2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
  2019-05-31 22:29 ` [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro Martin KaFai Lau
@ 2019-06-03 20:42 ` Alexei Starovoitov
  2 siblings, 0 replies; 9+ messages in thread
From: Alexei Starovoitov @ 2019-06-03 20:42 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: bpf, Network Development, Alexei Starovoitov, Daniel Borkmann,
	David Miller, Kernel Team

On Fri, May 31, 2019 at 3:29 PM Martin KaFai Lau <kafai@fb.com> wrote:
>
> This series has fixes when running reuseport's bpf_prog for udp lookup.
> If there is reuseport's bpf_prog, the common issue is the reuseport code
> path expects skb->data pointing to the transport header (udphdr here).
> A couple of commits broke this expectation.  The issue is specific
> to running bpf_prog, so bpf tag is used for this series.
>
> Please refer to the individual commit message for details.

Applied to bpf tree. Thanks

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-03 22:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 22:29 [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Martin KaFai Lau
2019-05-31 22:29 ` [PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err Martin KaFai Lau
2019-06-01 23:54   ` Song Liu
2019-06-03 13:07   ` Craig Gallek
2019-05-31 22:29 ` [PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro Martin KaFai Lau
2019-06-01 23:54   ` Song Liu
2019-06-02  1:09     ` Martin Lau
2019-06-02  7:05       ` Song Liu
2019-06-03 20:42 ` [PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).