From: John Fastabend <john.fastabend@gmail.com>
To: jasowang@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/2] illustrate cmpxchg ring for tap/tun and qdisc
Date: Thu, 10 Nov 2016 20:43:47 -0800 [thread overview]
Message-ID: <20161111043857.1547.70337.stgit@john-Precision-Tower-5810> (raw)
This is a cmpxchg ring that could potentially be used to replace the spinlock
variant of skb_array.
Couple comments its missing a resize operator which would need to be added
before it could be a drop in replacement. And although I tested the first
patch with my latest set of qdisc updates the second patch I have not tested
for a bit so it may or may not work but it illustrates the idea at least.
This was derived from the DPDK documentation where there is a description
of the cmpxchg ring presumably used there. It may or may not actually align
with what is done in DPDK implementation I have no idea I didn't look.
---
John Fastabend (2):
net: use cmpxchg instead of spinlock in ptr rings
ptr_ring_ll: pop/push multiple objects at once
include/linux/netdevice.h | 12 ----
include/linux/ptr_ring_ll.h | 146 +++++++++++++++++++++++++++++++++++++++++++
include/linux/skb_array.h | 32 +++++++++
net/core/dev.c | 18 +----
net/sched/sch_generic.c | 86 +++++++++++++------------
5 files changed, 224 insertions(+), 70 deletions(-)
create mode 100644 include/linux/ptr_ring_ll.h
next reply other threads:[~2016-11-11 4:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 4:43 John Fastabend [this message]
2016-11-11 4:44 ` [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings John Fastabend
2016-11-14 11:09 ` Jesper Dangaard Brouer
2016-11-14 23:01 ` Michael S. Tsirkin
2016-11-16 4:30 ` John Fastabend
2016-11-11 4:44 ` [RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once John Fastabend
2016-11-14 23:06 ` Michael S. Tsirkin
2016-11-16 4:42 ` John Fastabend
2016-11-16 5:23 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161111043857.1547.70337.stgit@john-Precision-Tower-5810 \
--to=john.fastabend@gmail.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).