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]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux