Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-19 Thread Martin KaFai Lau
On Thu, Jul 19, 2018 at 05:43:11PM +0200, Daniel Borkmann wrote: > On 07/19/2018 02:11 AM, Martin KaFai Lau wrote: > > On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote: > >> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: > >>> On 07/18/2018 10:42 AM, Daniel Borkmann wrote:

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-19 Thread Daniel Borkmann
On 07/19/2018 02:11 AM, Martin KaFai Lau wrote: > On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote: >> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: >>> On 07/18/2018 10:42 AM, Daniel Borkmann wrote: On 07/18/2018 02:27 AM, Jakub Kicinski wrote: > On Wed, 18 Ju

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Jakub Kicinski
On Wed, 18 Jul 2018 16:52:34 -0700, Martin KaFai Lau wrote: > On Tue, Jul 17, 2018 at 05:27:43PM -0700, Jakub Kicinski wrote: > > On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > > > # bpftool map dump id 386 > > >[{ > > > "key": 0, > > > "value": { > > >

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Martin KaFai Lau
On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote: > On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: > > On 07/18/2018 10:42 AM, Daniel Borkmann wrote: > > > On 07/18/2018 02:27 AM, Jakub Kicinski wrote: > > >> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: >

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Martin KaFai Lau
On Tue, Jul 17, 2018 at 05:27:43PM -0700, Jakub Kicinski wrote: > On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > > # bpftool map dump id 386 > >[{ > > "key": 0, > > "value": { > > "": { > > "value": 0, > > "ifindex": 0,

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Jakub Kicinski
On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: > On 07/18/2018 10:42 AM, Daniel Borkmann wrote: > > On 07/18/2018 02:27 AM, Jakub Kicinski wrote: > >> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > >>> # bpftool map dump id 386 > >>>[{ > >>> "key": 0, > >

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Daniel Borkmann
On 07/18/2018 10:42 AM, Daniel Borkmann wrote: > On 07/18/2018 02:27 AM, Jakub Kicinski wrote: >> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: >>> # bpftool map dump id 386 >>>[{ >>> "key": 0, >>> "value": { >>> "": { >>> "value": 0, >

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-18 Thread Daniel Borkmann
On 07/18/2018 02:27 AM, Jakub Kicinski wrote: > On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: >> # bpftool map dump id 386 >>[{ >> "key": 0, >> "value": { >> "": { >> "value": 0, >> "ifindex": 0, >> "mac"

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-17 Thread Jakub Kicinski
On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > # bpftool map dump id 386 >[{ > "key": 0, > "value": { > "": { > "value": 0, > "ifindex": 0, > "mac": [] > } > } > },{ > "ke

[PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-17 Thread Daniel Borkmann
Implement loading of .BTF section from object file and build up internal table for retrieving key/value id related to maps in the BPF program. Latter is done by setting up struct btf_type table. One of the issues is that there's a disconnect between the data types used in the map and struct bpf_el