Re: [PATCH 1/2] Add api to manipulate global variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 5, 2023 at 1:58 AM Yang Bo <yyyeer.bo@xxxxxxxxx> wrote:
>
> From: Yang Bo <bo@xxxxxxxx>
>
> implement function.
> refactor code.
>
> Signed-off-by: Yang Bo <bo@xxxxxxxx>
> ---

There is no need for libbpf to add new APIs for this. First, BPF
skeleton is the preferred and natural way to work with BPF global
variables. Second, if you don't want to use BPF skeleton, you can find
all this information in BTF directly by using bpf_object__btf() +
bpf_map__btf_value_type_id() APIs.

>  tools/lib/bpf/bpf.c      | 808 +++++++++++++++++++++++++++++++++++++++
>  tools/lib/bpf/bpf.h      |   9 +
>  tools/lib/bpf/libbpf.map |   2 +
>  3 files changed, 819 insertions(+)
>

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux