Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread Alexei Starovoitov
On Wed, May 09, 2018 at 03:39:52PM -0600, David Ahern wrote: > On 5/9/18 3:29 PM, David Ahern wrote: > > On 5/9/18 2:44 PM, Daniel Borkmann wrote: > >> Generally, no objection. However, could we get rid of the two extra > >> includes altogether > >> to avoid running into any such dependency issue?

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread Daniel Borkmann
On 05/09/2018 11:39 PM, David Ahern wrote: > On 5/9/18 3:29 PM, David Ahern wrote: >> On 5/9/18 2:44 PM, Daniel Borkmann wrote: >>> Generally, no objection. However, could we get rid of the two extra >>> includes altogether >>> to avoid running into any such dependency issue? Right now the only >

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread David Ahern
On 5/9/18 3:29 PM, David Ahern wrote: > On 5/9/18 2:44 PM, Daniel Borkmann wrote: >> Generally, no objection. However, could we get rid of the two extra includes >> altogether >> to avoid running into any such dependency issue? Right now the only includes >> we have in >> the bpf uapi header is l

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread David Ahern
On 5/9/18 2:44 PM, Daniel Borkmann wrote: > Generally, no objection. However, could we get rid of the two extra includes > altogether > to avoid running into any such dependency issue? Right now the only includes > we have in > the bpf uapi header is linux/types.h and linux/bpf_common.h (latter h

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread Daniel Borkmann
On 05/09/2018 06:05 PM, David Ahern wrote: > On 5/9/18 2:15 AM, Daniel Borkmann wrote: >> >> Ohh well, this is causing allmodconfig build warnings (e.g. on x86) as >> reported today: > > lovely. > >> In file included from include/linux/dma-mapping.h:5:0, >> from include/linux/sk

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread David Ahern
On 5/9/18 2:15 AM, Daniel Borkmann wrote: > > Ohh well, this is causing allmodconfig build warnings (e.g. on x86) as > reported today: lovely. > > In file included from include/linux/dma-mapping.h:5:0, > from include/linux/skbuff.h:34, > from include/linux/if_

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-09 Thread Daniel Borkmann
On 05/04/2018 04:54 AM, David Ahern wrote: > Provide a helper for doing a FIB and neighbor lookup in the kernel > tables from an XDP program. The helper provides a fastpath for forwarding > packets. If the packet is a local delivery or for any reason is not a > simple lookup and forward, the packet

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-07 Thread David Miller
From: David Ahern Date: Mon, 7 May 2018 08:26:47 -0600 > On 5/7/18 8:10 AM, Daniel Borkmann wrote: >> On 05/07/2018 03:35 PM, Jesper Dangaard Brouer wrote: >>> On Thu, 3 May 2018 19:54:31 -0700 David Ahern wrote: >>> diff --git a/net/core/filter.c b/net/core/filter.c index 6877426c23a

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-07 Thread David Ahern
On 5/7/18 8:10 AM, Daniel Borkmann wrote: > On 05/07/2018 03:35 PM, Jesper Dangaard Brouer wrote: >> On Thu, 3 May 2018 19:54:31 -0700 David Ahern wrote: >> >>> diff --git a/net/core/filter.c b/net/core/filter.c >>> index 6877426c23a6..cf0d27acf1d1 100644 >>> --- a/net/core/filter.c >>> +++ b/net

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-07 Thread Daniel Borkmann
On 05/07/2018 03:35 PM, Jesper Dangaard Brouer wrote: > On Thu, 3 May 2018 19:54:31 -0700 David Ahern wrote: > >> diff --git a/net/core/filter.c b/net/core/filter.c >> index 6877426c23a6..cf0d27acf1d1 100644 >> --- a/net/core/filter.c >> +++ b/net/core/filter.c > [...] >> +static const struct bp

Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-07 Thread Jesper Dangaard Brouer
On Thu, 3 May 2018 19:54:31 -0700 David Ahern wrote: > diff --git a/net/core/filter.c b/net/core/filter.c > index 6877426c23a6..cf0d27acf1d1 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c [...] > +static const struct bpf_func_proto bpf_xdp_fib_lookup_proto = { > + .func

[bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-03 Thread David Ahern
Provide a helper for doing a FIB and neighbor lookup in the kernel tables from an XDP program. The helper provides a fastpath for forwarding packets. If the packet is a local delivery or for any reason is not a simple lookup and forward, the packet continues up the stack. If it is to be forwarded,