[LTP] [PATCH v2 2/5] bpf: Add map_array helper functions
Richard Palethorpe
rpalethorpe@suse.de
Wed May 5 12:27:34 CEST 2021
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.
More information about the ltp
mailing list