> On Sat, 20 Jun 2020 00:57:19 +0200 > Lorenzo Bianconi <lorenzo@xxxxxxxxxx> wrote: > > > As it has been already done for devmap, introduce 'struct bpf_cpumap_val' > > to formalize the expected values that can be passed in for a CPUMAP. > > Update cpumap code to use the struct. > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> > > --- > > include/uapi/linux/bpf.h | 9 +++++++++ > > kernel/bpf/cpumap.c | 25 +++++++++++++------------ > > tools/include/uapi/linux/bpf.h | 9 +++++++++ > > 3 files changed, 31 insertions(+), 12 deletions(-) > > > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > > index 19684813faae..a45d61bc886e 100644 > > --- a/include/uapi/linux/bpf.h > > +++ b/include/uapi/linux/bpf.h > > @@ -3774,6 +3774,15 @@ struct bpf_devmap_val { > > } bpf_prog; > > }; > > > > +/* CPUMAP map-value layout > > + * > > + * The struct data-layout of map-value is a configuration interface. > > + * New members can only be added to the end of this structure. > > + */ > > +struct bpf_cpumap_val { > > + __u32 qsize; /* queue size */ > > +}; > > + > > Nitpicking the comment: /* queue size */ > It doesn't provide much information to the end-user. > > What about changing it to: /* queue size to remote target CPU */ Yes, I agree. I will fix it in v3. Regards, Lorenzo > ? > > -- > Best regards, > Jesper Dangaard Brouer > MSc.CS, Principal Kernel Engineer at Red Hat > LinkedIn: http://www.linkedin.com/in/brouer >
Attachment:
signature.asc
Description: PGP signature