On Mon, Aug 14, 2023 at 10:30 AM Yonghong Song <yonghong.song@xxxxxxxxx> wrote: > > Now 'BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE + local percpu ptr' I found this commit message very confusing until I realized there was a typo here. Shouldn't this be "Now 'BPF_MAP_TYPE_CGRP_STORAGE + local percpu ptr'"? > can cover all BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE functionality > and more. So mark BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE deprecated. > > Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx> > --- > include/uapi/linux/bpf.h | 9 ++++++++- > tools/include/uapi/linux/bpf.h | 9 ++++++++- > 2 files changed, 16 insertions(+), 2 deletions(-) > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index d21deb46f49f..5d1bb6b42ea2 100644 > --- a/include/uapi/linux/bpf.h > +++ b/include/uapi/linux/bpf.h > @@ -932,7 +932,14 @@ enum bpf_map_type { > */ > BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, > BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, > - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, > + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, > + /* BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE is available to bpf programs > + * attaching to a cgroup. The new mechanism (BPF_MAP_TYPE_CGRP_STORAGE + > + * local percpu kptr) supports all BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE > + * functionality and more. So mark * BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE > + * deprecated. > + */ > + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, > BPF_MAP_TYPE_QUEUE, > BPF_MAP_TYPE_STACK, > BPF_MAP_TYPE_SK_STORAGE, > diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h > index d21deb46f49f..5d1bb6b42ea2 100644 > --- a/tools/include/uapi/linux/bpf.h > +++ b/tools/include/uapi/linux/bpf.h > @@ -932,7 +932,14 @@ enum bpf_map_type { > */ > BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, > BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, > - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, > + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, > + /* BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE is available to bpf programs > + * attaching to a cgroup. The new mechanism (BPF_MAP_TYPE_CGRP_STORAGE + > + * local percpu kptr) supports all BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE > + * functionality and more. So mark * BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE > + * deprecated. > + */ > + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, > BPF_MAP_TYPE_QUEUE, > BPF_MAP_TYPE_STACK, > BPF_MAP_TYPE_SK_STORAGE, > -- > 2.34.1 > >