Re: [PATCH net-next] bpf: pass sk to helper functions

2017-04-11 Thread Willem de Bruijn
On Tue, Apr 11, 2017 at 12:51 PM, Eric Dumazet wrote: > On Tue, 2017-04-11 at 12:22 -0400, Willem de Bruijn wrote: >> From: Willem de Bruijn >> >> BPF helper functions access socket fields through skb->sk. This is not >> set in ingress cgroup and socket filters. The association is only made >> in

Re: [PATCH net-next] bpf: pass sk to helper functions

2017-04-11 Thread Eric Dumazet
On Tue, 2017-04-11 at 12:22 -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > BPF helper functions access socket fields through skb->sk. This is not > set in ingress cgroup and socket filters. The association is only made > in skb_set_owner_r once the filter has accepted the packet. Sk

[PATCH net-next] bpf: pass sk to helper functions

2017-04-11 Thread Willem de Bruijn
From: Willem de Bruijn BPF helper functions access socket fields through skb->sk. This is not set in ingress cgroup and socket filters. The association is only made in skb_set_owner_r once the filter has accepted the packet. Sk is available as socket lookup has taken place. Temporarily set skb->