Re: [RFC v2 bpf-next 2/5] bpf: return EOPNOTSUPP when map lookup isn't supported

2018-10-04 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 09:16:04AM +0900, Prashant Bhole wrote: > > > On 10/5/2018 9:10 AM, Alexei Starovoitov wrote: > > On Tue, Oct 02, 2018 at 02:35:16PM +0900, Prashant Bhole wrote: > > > Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below > > > map types: > > > - BPF_MAP_TYPE

Re: [RFC v2 bpf-next 2/5] bpf: return EOPNOTSUPP when map lookup isn't supported

2018-10-04 Thread Alexei Starovoitov
On Tue, Oct 02, 2018 at 02:35:16PM +0900, Prashant Bhole wrote: > Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below > map types: > - BPF_MAP_TYPE_PROG_ARRAY > - BPF_MAP_TYPE_STACK_TRACE > - BPF_MAP_TYPE_XSKMAP > - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH > > Signed-off-by: Pras

Re: [RFC v2 bpf-next 2/5] bpf: return EOPNOTSUPP when map lookup isn't supported

2018-10-04 Thread Prashant Bhole
On 10/5/2018 9:10 AM, Alexei Starovoitov wrote: On Tue, Oct 02, 2018 at 02:35:16PM +0900, Prashant Bhole wrote: Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below map types: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_

[RFC v2 bpf-next 2/5] bpf: return EOPNOTSUPP when map lookup isn't supported

2018-10-01 Thread Prashant Bhole
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below map types: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH Signed-off-by: Prashant Bhole --- kernel/bpf/arraymap.c | 2 +- kernel/bpf/sockmap.c | 2 +- ker