Re: [PATCH v2 bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-23 Thread Martin KaFai Lau
On Mon, Jul 23, 2018 at 11:31:43AM -0700, Yonghong Song wrote: > > > On 7/21/18 11:20 AM, Martin KaFai Lau wrote: > > This patch introduces BPF_ANNOTATE_KV_PAIR to signal the > > bpf loader about the btf key_type and value_type of a bpf map. > > Please refer to the changes in test_btf_haskv.c for

Re: [PATCH v2 bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-23 Thread Yonghong Song
On 7/21/18 11:20 AM, Martin KaFai Lau wrote: This patch introduces BPF_ANNOTATE_KV_PAIR to signal the bpf loader about the btf key_type and value_type of a bpf map. Please refer to the changes in test_btf_haskv.c for its usage. Both iproute2 and libbpf loader will then have the same convention

[PATCH v2 bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-21 Thread Martin KaFai Lau
This patch introduces BPF_ANNOTATE_KV_PAIR to signal the bpf loader about the btf key_type and value_type of a bpf map. Please refer to the changes in test_btf_haskv.c for its usage. Both iproute2 and libbpf loader will then have the same convention to find out the map's btf_key_type_id and btf_val