Re: [PATCH v3 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-29 Thread Jesper Dangaard Brouer
On Fri, 29 May 2020 09:36:14 -0600 David Ahern wrote: > On 5/29/20 2:22 AM, Jesper Dangaard Brouer wrote: > > We do need this struct bpf_devmap_val, but I think it is wrong to make this > > UAPI. > > > > A BPF-prog can get this via: #include "vmlinux.h" > > sure. I see that now. > > I forg

Re: [PATCH v3 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-29 Thread David Ahern
On 5/29/20 2:22 AM, Jesper Dangaard Brouer wrote: > We do need this struct bpf_devmap_val, but I think it is wrong to make this > UAPI. > > A BPF-prog can get this via: #include "vmlinux.h" sure. I see that now. I forgot to fold in a small update to the selftests, so I need to send a v4 anyway

Re: [PATCH v3 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-29 Thread Jesper Dangaard Brouer
On Thu, 28 May 2020 23:20:53 -0600 David Ahern wrote: > Add 'struct bpf_devmap_val' to the bpf uapi to formalize the > expected values that can be passed in for a DEVMAP. > Update devmap code to use the struct. > > Signed-off-by: David Ahern > --- > include/uapi/linux/bpf.h | 5 + >

[PATCH v3 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-28 Thread David Ahern
Add 'struct bpf_devmap_val' to the bpf uapi to formalize the expected values that can be passed in for a DEVMAP. Update devmap code to use the struct. Signed-off-by: David Ahern --- include/uapi/linux/bpf.h | 5 + kernel/bpf/devmap.c| 40 +++---