Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-16 Thread Joe Stringer
On 15 May 2018 at 09:48, Martin KaFai Lau wrote: > On Mon, May 14, 2018 at 08:16:59PM -0700, Alexei Starovoitov wrote: >> On Fri, May 11, 2018 at 05:54:33PM -0700, Joe Stringer wrote: >> > On 11 May 2018 at 14:41, Martin KaFai Lau wrote: >> > > On Fri, May 11, 2018 at 02:08:01PM -0700, Joe String

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-15 Thread Martin KaFai Lau
On Mon, May 14, 2018 at 08:16:59PM -0700, Alexei Starovoitov wrote: > On Fri, May 11, 2018 at 05:54:33PM -0700, Joe Stringer wrote: > > On 11 May 2018 at 14:41, Martin KaFai Lau wrote: > > > On Fri, May 11, 2018 at 02:08:01PM -0700, Joe Stringer wrote: > > >> On 10 May 2018 at 22:00, Martin KaFai

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-14 Thread Alexei Starovoitov
On Fri, May 11, 2018 at 05:54:33PM -0700, Joe Stringer wrote: > On 11 May 2018 at 14:41, Martin KaFai Lau wrote: > > On Fri, May 11, 2018 at 02:08:01PM -0700, Joe Stringer wrote: > >> On 10 May 2018 at 22:00, Martin KaFai Lau wrote: > >> > On Wed, May 09, 2018 at 02:07:05PM -0700, Joe Stringer wr

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-11 Thread Joe Stringer
On 11 May 2018 at 14:41, Martin KaFai Lau wrote: > On Fri, May 11, 2018 at 02:08:01PM -0700, Joe Stringer wrote: >> On 10 May 2018 at 22:00, Martin KaFai Lau wrote: >> > On Wed, May 09, 2018 at 02:07:05PM -0700, Joe Stringer wrote: >> >> This patch adds a new BPF helper function, sk_lookup() whic

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-11 Thread Martin KaFai Lau
On Fri, May 11, 2018 at 02:08:01PM -0700, Joe Stringer wrote: > On 10 May 2018 at 22:00, Martin KaFai Lau wrote: > > On Wed, May 09, 2018 at 02:07:05PM -0700, Joe Stringer wrote: > >> This patch adds a new BPF helper function, sk_lookup() which allows BPF > >> programs to find out if there is a so

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-11 Thread Joe Stringer
On 10 May 2018 at 22:00, Martin KaFai Lau wrote: > On Wed, May 09, 2018 at 02:07:05PM -0700, Joe Stringer wrote: >> This patch adds a new BPF helper function, sk_lookup() which allows BPF >> programs to find out if there is a socket listening on this host, and >> returns a socket pointer which the

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-10 Thread Martin KaFai Lau
On Wed, May 09, 2018 at 02:07:05PM -0700, Joe Stringer wrote: > This patch adds a new BPF helper function, sk_lookup() which allows BPF > programs to find out if there is a socket listening on this host, and > returns a socket pointer which the BPF program can then access to > determine, for instan

[RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-09 Thread Joe Stringer
This patch adds a new BPF helper function, sk_lookup() which allows BPF programs to find out if there is a socket listening on this host, and returns a socket pointer which the BPF program can then access to determine, for instance, whether to forward or drop traffic. sk_lookup() takes a reference