Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-17 Thread Saeed Mahameed
On Thu, 2020-12-17 at 19:28 +0100, Maciej Fijalkowski wrote: > On Thu, Dec 17, 2020 at 10:16:06AM -0800, Saeed Mahameed wrote: > > On Wed, 2020-12-16 at 16:01 +0100, Lorenzo Bianconi wrote: > > > > On Tue, 15 Dec 2020 14:47:10 +0100 > > > > Lorenzo Bianconi wrote: > > > > > > > > > [...] > > > >

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-17 Thread Maciej Fijalkowski
On Thu, Dec 17, 2020 at 10:16:06AM -0800, Saeed Mahameed wrote: > On Wed, 2020-12-16 at 16:01 +0100, Lorenzo Bianconi wrote: > > > On Tue, 15 Dec 2020 14:47:10 +0100 > > > Lorenzo Bianconi wrote: > > > > > > > [...] > > > > > > xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); > > > > > > diff --gi

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-17 Thread Saeed Mahameed
On Wed, 2020-12-16 at 16:01 +0100, Lorenzo Bianconi wrote: > > On Tue, 15 Dec 2020 14:47:10 +0100 > > Lorenzo Bianconi wrote: > > > > > [...] > > > > > xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); > > > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > > > > b/drivers/net/ethe

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-16 Thread Lorenzo Bianconi
> On Tue, 15 Dec 2020 14:47:10 +0100 > Lorenzo Bianconi wrote: > > > [...] > > > > xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); > > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > > > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > > > index 4dbbbd49c389..fcd1ca3343fb 1

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-16 Thread Jesper Dangaard Brouer
On Tue, 15 Dec 2020 14:47:10 +0100 Lorenzo Bianconi wrote: > [...] > > > xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > > index 4dbbbd49c389..fcd1ca3343fb 100644 > > > --- a/driv

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-16 Thread Jesper Dangaard Brouer
On Tue, 15 Dec 2020 16:13:44 +0100 Maciej Fijalkowski wrote: > On Tue, Dec 15, 2020 at 04:06:20PM +0100, Lorenzo Bianconi wrote: > > > On 12/15/20 2:47 PM, Lorenzo Bianconi wrote: > > > [...] > > > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > > > > > index 3293

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Lorenzo Bianconi
> On Tue, Dec 15, 2020 at 04:06:20PM +0100, Lorenzo Bianconi wrote: > > > On 12/15/20 2:47 PM, Lorenzo Bianconi wrote: > > > [...] > > > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > > > > > index 329397c60d84..61d3f5f8b7f3 100644 > > > > > > --- a/drivers/net/xen-n

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Maciej Fijalkowski
On Tue, Dec 15, 2020 at 04:06:20PM +0100, Lorenzo Bianconi wrote: > > On 12/15/20 2:47 PM, Lorenzo Bianconi wrote: > > [...] > > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > > > > index 329397c60d84..61d3f5f8b7f3 100644 > > > > > --- a/drivers/net/xen-netfront.c >

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Lorenzo Bianconi
> On 12/15/20 2:47 PM, Lorenzo Bianconi wrote: > [...] > > > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > > > > index 329397c60d84..61d3f5f8b7f3 100644 > > > > --- a/drivers/net/xen-netfront.c > > > > +++ b/drivers/net/xen-netfront.c > > > > @@ -866,10 +866,8 @@ static u

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Daniel Borkmann
On 12/15/20 2:47 PM, Lorenzo Bianconi wrote: [...] diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 329397c60d84..61d3f5f8b7f3 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -866,10 +866,8 @@ static u32 xennet_run_xdp(struct netfront_queue *q

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Lorenzo Bianconi
[...] > > xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > index 4dbbbd49c389..fcd1ca3343fb 100644 > > --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > > +++ b/drivers/net/ethernet/

Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-15 Thread Maciej Fijalkowski
On Sat, Dec 12, 2020 at 06:41:49PM +0100, Lorenzo Bianconi wrote: > Introduce xdp_prepare_buff utility routine to initialize per-descriptor > xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in > all XDP capable drivers. > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net

[PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-12 Thread Lorenzo Bianconi
Introduce xdp_prepare_buff utility routine to initialize per-descriptor xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in all XDP capable drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 ++--- drivers/net/ethernet/broadcom