Re: [PATCH v2 bpf-next 6/9] libbpf: use negative fd to specify missing BTF

2019-07-02 Thread Stanislav Fomichev
On 07/02, Stanislav Fomichev wrote: > On 05/29, Andrii Nakryiko wrote: > > 0 is a valid FD, so it's better to initialize it to -1, as is done in > > other places. Also, technically, BTF type ID 0 is valid (it's a VOID > > type), so it's more reliable to check btf_fd, instead of > > btf_key_type_id,

Re: [PATCH v2 bpf-next 6/9] libbpf: use negative fd to specify missing BTF

2019-07-02 Thread Stanislav Fomichev
On 05/29, Andrii Nakryiko wrote: > 0 is a valid FD, so it's better to initialize it to -1, as is done in > other places. Also, technically, BTF type ID 0 is valid (it's a VOID > type), so it's more reliable to check btf_fd, instead of > btf_key_type_id, to determine if there is any BTF associated w

[PATCH v2 bpf-next 6/9] libbpf: use negative fd to specify missing BTF

2019-05-29 Thread Andrii Nakryiko
0 is a valid FD, so it's better to initialize it to -1, as is done in other places. Also, technically, BTF type ID 0 is valid (it's a VOID type), so it's more reliable to check btf_fd, instead of btf_key_type_id, to determine if there is any BTF associated with a map. Acked-by: Song Liu Signed-of