Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-07 Thread David Ahern
On 9/7/20 12:02 PM, Jesper Dangaard Brouer wrote: > >> ok, is there any alignment requirement? can frame_sz be number of 32-bit >> words? I believe bit shifts are cheap. > > No that is not possible, because some drivers and generic-XDP have a > fully dynamic frame_sz. > frame_sz represents allo

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-07 Thread Jesper Dangaard Brouer
On Fri, 4 Sep 2020 10:30:48 -0600 David Ahern wrote: > On 9/4/20 9:59 AM, Jesper Dangaard Brouer wrote: > >> dev_rx for example seems like it could just be the netdev > >> index rather than a pointer or perhaps can be removed completely. I > >> believe it is only used for 1 use case (redirects to

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread David Ahern
On 9/4/20 9:59 AM, Jesper Dangaard Brouer wrote: >> dev_rx for example seems like it could just be the netdev >> index rather than a pointer or perhaps can be removed completely. I >> believe it is only used for 1 use case (redirects to CPUMAP); maybe that >> code can be refactored to handle the de

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread Jesper Dangaard Brouer
On Fri, 4 Sep 2020 09:15:04 -0600 David Ahern wrote: > On 9/4/20 1:19 AM, Jesper Dangaard Brouer wrote: > > On Thu, 3 Sep 2020 18:07:05 -0700 > > Alexei Starovoitov wrote: > > > >> On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: > >>> Introduce multi-buffer bit (mb) in xdp

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread David Ahern
On 9/4/20 1:19 AM, Jesper Dangaard Brouer wrote: > On Thu, 3 Sep 2020 18:07:05 -0700 > Alexei Starovoitov wrote: > >> On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: >>> Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify >>> if shared_info area has been properly

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread Jesper Dangaard Brouer
On Thu, 3 Sep 2020 18:07:05 -0700 Alexei Starovoitov wrote: > On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: > > Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify > > if shared_info area has been properly initialized for non-linear > > xdp buffers > > > > Sign

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-03 Thread Alexei Starovoitov
On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: > Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify > if shared_info area has been properly initialized for non-linear > xdp buffers > > Signed-off-by: Lorenzo Bianconi > --- > include/net/xdp.h | 8 ++-- > ne

[PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-03 Thread Lorenzo Bianconi
Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify if shared_info area has been properly initialized for non-linear xdp buffers Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 8 ++-- net/core/xdp.c| 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --gi