Re: [PATCH bpf-next v5 1/1] bpf, docs: document BPF_MAP_TYPE_ARRAY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bagas Sanjaya <bagasdotme@xxxxxxxxx> writes:

> On 10/4/22 23:19, Donald Hunter wrote:
>> +Examples
>> +========
>> +
>> +Please see the ``tools/testing/selftests/bpf`` directory for functional
>> +examples. The sample code below demonstrates API usage.
>> +
>
> Since you have many code snippets, better say "The code samples below".

Good catch.

>> +BPF_MAP_TYPE_ARRAY
>> +~~~~~~~~~~~~~~~~~~
>> +
>> +This example shows array creation, initialisation and lookup from userspace.
>> +
>
> "Initialize the array, set elements, and perform lookup".
>
> ...
>
>> +BPF_MAP_TYPE_PERCPU_ARRAY
>> +~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +This example shows per CPU array usage.
>> +
>
> What is the purpose of above snippet? Give more detailed explanation.
>
> Thanks.

I will rework both examples into separate snippets for create, init and
lookup.

Thanks!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux