Re: [PATCH bpf-next v4 7/7] docs/bpf: Add documentation for new cgroup local storage

Yonghong Song
2022-10-24T21:03:06Z

On 10/23/22 1:26 PM, David Vernet wrote:
> On Sun, Oct 23, 2022 at 11:05:52AM -0700, Yonghong Song wrote:
>> Add some descriptions and examples for BPF_MAP_TYPE_CGRP_STROAGE.
>
> s/STROAGE/STORAGE here and elsewhere

Thanks. Will make corresponding changes for this and other suggestions
below.

>
>> Also illustate the major difference between BPF_MAP_TYPE_CGRP_STROAGE
>> and BPF_MAP_TYPE_CGROUP_STORAGE and recommend to use
>> BPF_MAP_TYPE_CGRP_STROAGE instead of BPF_MAP_TYPE_CGROUP_STORAGE
>> in the end.
>>
>> Signed-off-by: Yonghong Song <yhs@fb.com>
>> ---
>> Documentation/bpf/map_cgrp_storage.rst | 109 +++++++++++++++++++++++++
>> 1 file changed, 109 insertions(+)
>> create mode 100644 Documentation/bpf/map_cgrp_storage.rst
>>
>> diff --git a/Documentation/bpf/map_cgrp_storage.rst b/Documentation/bpf/map_cgrp_storage.rst
>> new file mode 100644
>> index 000000000000..4dfc7770da7e
>> --- /dev/null
>> +++ b/Documentation/bpf/map_cgrp_storage.rst
>> @@ -0,0 +1,109 @@
>> +.. SPDX-License-Identifier: GPL-2.0-only
>> +.. Copyright (C) 2022 Meta Platforms, Inc. and affiliates.
>> +
>> +===========================
>> +BPF_MAP_TYPE_CGRP_STORAGE
>> +===========================
>
> Small nit, can you trim the == border so it matches the width of
> BPF_MAP_TYPE_CGRP_STORAGE?
>
>> +
>> +The ``BPF_MAP_TYPE_CGRP_STORAGE`` map type represents a local fix-sized
>> +storage for cgroups. It is only available with ``CONFIG_CGROUP_BPF``.
>
> This is no longer accurate and should say, "It is only available with
> ``CONFIG_CGROUPS``."
> …