Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-15 Thread John Fastabend
On 16-11-15 05:32 AM, Jesper Dangaard Brouer wrote: > > (looks like my message didn't reach the netdev list, due to me sending > from the wrong email, forwarded message again): > > On Thu, 10 Nov 2016 20:44:08 -0800 John Fastabend > wrote: > >> --- >> include/linux/ptr_ring_ll.h | 136 >> ++

Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-15 Thread John Fastabend
On 16-11-14 03:01 PM, Michael S. Tsirkin wrote: > On Thu, Nov 10, 2016 at 08:44:08PM -0800, John Fastabend wrote: >> >> --- >> include/linux/ptr_ring_ll.h | 136 >> +++ >> include/linux/skb_array.h | 25 >> 2 files changed, 161 insertions(+) >

Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 02:32:58PM +0100, Jesper Dangaard Brouer wrote: > What I would really like to see is a lock-free (locked cmpxchg) queue > implementation, what like ptr_ring use the array as empty/full check, > and still (somehow) support bulking. I think lock-free is overrated for this use

[RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-15 Thread Jesper Dangaard Brouer
(looks like my message didn't reach the netdev list, due to me sending from the wrong email, forwarded message again): On Thu, 10 Nov 2016 20:44:08 -0800 John Fastabend wrote: > --- > include/linux/ptr_ring_ll.h | 136 > +++ > include/linux/skb_array.

Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-14 Thread Michael S. Tsirkin
On Thu, Nov 10, 2016 at 08:44:08PM -0800, John Fastabend wrote: > > --- > include/linux/ptr_ring_ll.h | 136 > +++ > include/linux/skb_array.h | 25 > 2 files changed, 161 insertions(+) > create mode 100644 include/linux/ptr_ring_ll.h > > d

Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-14 Thread Jesper Dangaard Brouer
On Thu, 10 Nov 2016 20:44:08 -0800 John Fastabend wrote: > --- > include/linux/ptr_ring_ll.h | 136 > +++ > include/linux/skb_array.h | 25 > 2 files changed, 161 insertions(+) > create mode 100644 include/linux/ptr_ring_ll.h > > diff --

[RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-10 Thread John Fastabend
--- include/linux/ptr_ring_ll.h | 136 +++ include/linux/skb_array.h | 25 2 files changed, 161 insertions(+) create mode 100644 include/linux/ptr_ring_ll.h diff --git a/include/linux/ptr_ring_ll.h b/include/linux/ptr_ring_ll.h new file mode