Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-24 Thread Jakub Kicinski
On Thu, 24 Jan 2019 19:27:35 +0100, Maciej Fijałkowski wrote: > > > can live with this. In case of typo and program being not found it would > > > be > > > good to print out the section names to choose from in usage(). > > > > Agree, might be nice as well via libbpf. > > Would it be acceptab

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-24 Thread Maciej Fijałkowski
On Thu, 24 Jan 2019 13:09:49 +0100 Jesper Dangaard Brouer wrote: > On Thu, 24 Jan 2019 12:56:36 +0100 > Daniel Borkmann wrote: > > > > Please feel free to deprecate or remove the xdp_redirect_cpu --prognum > > > option. I would prefer if this was indeed converted to selecting the > > > program

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-24 Thread Jesper Dangaard Brouer
On Thu, 24 Jan 2019 12:56:36 +0100 Daniel Borkmann wrote: > > Please feel free to deprecate or remove the xdp_redirect_cpu --prognum > > option. I would prefer if this was indeed converted to selecting the > > program based on the name in the _kern.c file, instead of a number. > > Given this

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-24 Thread Daniel Borkmann
On 01/23/2019 03:24 PM, Jesper Dangaard Brouer wrote: > On Wed, 23 Jan 2019 14:41:59 +0100 > Maciej Fijalkowski wrote: > >> On Wed, 23 Jan 2019 11:41:11 +0100 >> Daniel Borkmann wrote: >> >>> On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: xdp_redirect_cpu has a 6 different XDP programs

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Jesper Dangaard Brouer
On Wed, 23 Jan 2019 14:41:59 +0100 Maciej Fijalkowski wrote: > On Wed, 23 Jan 2019 11:41:11 +0100 > Daniel Borkmann wrote: > > > On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > > > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > > > network interface. This sample

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Daniel Borkmann
On 01/23/2019 02:41 PM, Maciej Fijalkowski wrote: > On Wed, 23 Jan 2019 11:41:11 +0100 > Daniel Borkmann wrote: >> On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: >>> xdp_redirect_cpu has a 6 different XDP programs that can be attached to >>> network interface. This sample has a option --prognum

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Maciej Fijalkowski
On Wed, 23 Jan 2019 11:41:11 +0100 Daniel Borkmann wrote: > On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > > network interface. This sample has a option --prognum that allows user > > for specifying which particular

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Daniel Borkmann
On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > network interface. This sample has a option --prognum that allows user > for specifying which particular program from a given set will be > attached to network interface. >

[PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-21 Thread Maciej Fijalkowski
xdp_redirect_cpu has a 6 different XDP programs that can be attached to network interface. This sample has a option --prognum that allows user for specifying which particular program from a given set will be attached to network interface. In order to make it easier when converting the mentioned sam