public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Maryam Tahhan <mtahhan@redhat.com>
To: Donald Hunter <donald.hunter@gmail.com>,
	bpf@vger.kernel.org, linux-doc@vger.kernel.org
Cc: dave@dtucker.co.uk
Subject: Re: [PATCH bpf-next v8 1/1] bpf, docs: document BPF_MAP_TYPE_ARRAY
Date: Mon, 24 Oct 2022 13:01:15 +0100	[thread overview]
Message-ID: <aa5f3e2e-10d2-ac78-187e-9aed94b11c0c@redhat.com> (raw)
In-Reply-To: <20221021142259.18093-2-donald.hunter@gmail.com>

On 21/10/2022 15:22, Donald Hunter wrote:
> |+.. code-block:: c + + int initialize_array(int fd) + { + int ncpus = 
> libbpf_num_possible_cpus(); + long values[ncpus]; + __u32 i, j; + int 
> ret; + + for (i = 0; i < 256 ; i++) { + for (j = 0; j < ncpus; j++) + 
> values[j] = i; + ret = bpf_map_update_elem(fd, &i, &values, BPF_ANY); + 
> if (ret < 0) + return ret; + } + + return ret;|

Reviewed-by: Maryam Tahhan <mtahhan@redhat.com>


  reply	other threads:[~2022-10-24 23:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 14:22 [PATCH bpf-next v8 0/1] Document BPF_MAP_TYPE_ARRAY Donald Hunter
2022-10-21 14:22 ` [PATCH bpf-next v8 1/1] bpf, docs: document BPF_MAP_TYPE_ARRAY Donald Hunter
2022-10-24 12:01   ` Maryam Tahhan [this message]
2022-10-25 13:57   ` Jesper D. Brouer
2022-10-25 16:47     ` Donald Hunter

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=aa5f3e2e-10d2-ac78-187e-9aed94b11c0c@redhat.com \
    --to=mtahhan@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=dave@dtucker.co.uk \
    --cc=donald.hunter@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox