From: Donald Hunter <donald.hunter@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: bpf@vger.kernel.org, linux-doc@vger.kernel.org, dave@dtucker.co.uk
Subject: Re: [PATCH bpf-next v5 1/1] bpf, docs: document BPF_MAP_TYPE_ARRAY
Date: Wed, 05 Oct 2022 11:12:19 +0100 [thread overview]
Message-ID: <m2y1tutw8s.fsf@gmail.com> (raw)
In-Reply-To: <acc73050-f0a4-099d-37c1-5fca6b20136c@gmail.com> (Bagas Sanjaya's message of "Wed, 5 Oct 2022 14:32:24 +0700")
Bagas Sanjaya <bagasdotme@gmail.com> 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!
prev parent reply other threads:[~2022-10-05 10:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 16:19 [PATCH bpf-next v5 0/1] Document BPF_MAP_TYPE_ARRAY Donald Hunter
2022-10-04 16:19 ` [PATCH bpf-next v5 1/1] bpf, docs: document BPF_MAP_TYPE_ARRAY Donald Hunter
2022-10-05 7:32 ` Bagas Sanjaya
2022-10-05 10:12 ` Donald Hunter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y1tutw8s.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=dave@dtucker.co.uk \
--cc=linux-doc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.