Re: [PATCH v2 bpf 1/5] libbpf: feature-detect arg:ctx tag support in kernel

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

 



On Wed, 2024-01-17 at 14:33 -0800, Andrii Nakryiko wrote:
[...]

> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index c5a42ac309fd..61db92189517 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -6757,6 +6757,69 @@ static int clone_func_btf_info(struct btf *btf, int orig_fn_id, struct bpf_progr
>  	return fn_id;
>  }
>  
> +static int probe_kern_arg_ctx_tag(void)

[...]

> +	btf_fd = libbpf__load_raw_btf((char *)types, sizeof(types), strs, sizeof(strs));
> +	if (btf_fd < 0)
> +		return 0;

Question:
  suppose this is an old kernel and decl tags are not supported,
  should negative result be cached as 0 in such case?

[...]







[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