All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 2/5] bpf: Add map_array helper functions
Date: Wed, 05 May 2021 11:27:34 +0100	[thread overview]
Message-ID: <87wnsdlbl5.fsf@suse.de> (raw)
In-Reply-To: <YIvAVaPNyunDHxaF@yuki>

Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> +long bpf_map_array_get(const int map_fd,
>> +		       const uint32_t *const array_indx,
>> +		       uint64_t *const array_val)
>
> Wouldn't the API be nicer if we passed just index value and returned the
> map value? We do TBROK if something goes wrong anyways, so there is no
> point in passing the return value from the bpf() syscall.

It would be nicer, but the existing tests put the key and value in
guarded buffers. I guess there are other types of memory we might want
to pass a pointer to as well.

-- 
Thank you,
Richard.

  reply	other threads:[~2021-05-05 10:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 15:05 [LTP] [PATCH v2 0/5] BPF refactor and add bpf_prog05 Richard Palethorpe
2021-04-29 15:05 ` [LTP] [PATCH v2 1/5] lapi/bpf: Add /=, %= and BPF_MAXINSNS Richard Palethorpe
2021-04-29 15:05 ` [LTP] [PATCH v2 2/5] bpf: Add map_array helper functions Richard Palethorpe
2021-04-30  8:31   ` Cyril Hrubis
2021-05-05 10:27     ` Richard Palethorpe [this message]
2021-04-29 15:05 ` [LTP] [PATCH v2 3/5] bpf: Add helper to run socket programs Richard Palethorpe
2021-04-30  8:38   ` Cyril Hrubis
2021-04-29 15:05 ` [LTP] [PATCH v2 4/5] bpf: Add bpf_insn_buf, map and instruction concatenation helpers Richard Palethorpe
2021-04-30  8:44   ` Cyril Hrubis
2021-04-29 15:05 ` [LTP] [PATCH v2 5/5] bpf: Check truncation on 32bit div/mod by zero Richard Palethorpe
2021-04-30  8:46   ` Cyril Hrubis

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=87wnsdlbl5.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=ltp@lists.linux.it \
    /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.