Re: [PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-26 Thread David Ahern
On 6/26/18 3:50 AM, Daniel Borkmann wrote: > [...] > You change all the semantics of return code here, but this breaks > bpf_skb_fib_lookup(). > I cannot see how this would work in that case. The code does the following > with the > bpf_ipv{4,6}_fib_lookup() return code: > > [...] >

Re: [PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-26 Thread Daniel Borkmann
Hi David, first off all sorry for my late reply, been mostly offline last week. I think there's still an issue with the current patch, more below: On 06/21/2018 05:00 AM, dsah...@kernel.org wrote: > From: David Ahern > > For ACLs implemented using either FIB rules or FIB entries, the BPF >

Re: [PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-22 Thread Jesper Dangaard Brouer
On Thu, 21 Jun 2018 10:09:36 -0700 Martin KaFai Lau wrote: > On Wed, Jun 20, 2018 at 08:00:11PM -0700, dsah...@kernel.org wrote: > > From: David Ahern > > > > For ACLs implemented using either FIB rules or FIB entries, the BPF > > program needs the FIB lookup status to be able to drop the

Re: [PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-21 Thread Martin KaFai Lau
On Wed, Jun 20, 2018 at 08:00:11PM -0700, dsah...@kernel.org wrote: > From: David Ahern > > For ACLs implemented using either FIB rules or FIB entries, the BPF > program needs the FIB lookup status to be able to drop the packet. > Since the bpf_fib_lookup API has not reached a released kernel

[PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-20 Thread dsahern
From: David Ahern For ACLs implemented using either FIB rules or FIB entries, the BPF program needs the FIB lookup status to be able to drop the packet. Since the bpf_fib_lookup API has not reached a released kernel yet, change the return code to contain an encoding of the FIB lookup result and