Re: [PATCH v4 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-21 Thread Lorenzo Bianconi
On Mon, Dec 21, 2020 at 9:37 AM Jesper Dangaard Brouer wrote: > > On Sat, 19 Dec 2020 18:55:00 +0100 > Lorenzo Bianconi wrote: > > > diff --git a/include/net/xdp.h b/include/net/xdp.h > > index 11ec93f827c0..323340caef88 100644 > > --- a/include/net/xdp.h > > +++ b/include/net/xdp.h > > @@ -76,6

Re: [PATCH v4 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-21 Thread Jesper Dangaard Brouer
On Sat, 19 Dec 2020 18:55:00 +0100 Lorenzo Bianconi wrote: > diff --git a/include/net/xdp.h b/include/net/xdp.h > index 11ec93f827c0..323340caef88 100644 > --- a/include/net/xdp.h > +++ b/include/net/xdp.h > @@ -76,6 +76,13 @@ struct xdp_buff { > u32 frame_sz; /* frame size to deduce data_h

[PATCH v4 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-19 Thread Lorenzo Bianconi
Introduce xdp_init_buff utility routine to initialize xdp_buff fields const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on xdp_init_buff in all XDP capable drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c| 3 +-- drivers/net/ethernet