This patch tries to poll for new added tx buffer or socket receive
queue for a while at the end of tx/rx processing. The maximum time
spent on polling were specified through a new kind of vring ioctl.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c
This path introduces a helper which can give a hint for whether or not
there's a work queued in the work list. This could be used for busy
polling code to exit the busy loop.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.c | 7 +++
drivers/vhost/vhost.h |
and exit the loop when there's a pending signal
- disable preemption during busy looping to make sure lock_clock() was
correctly used.
Jason Wang (3):
vhost: introduce vhost_has_work()
vhost: introduce vhost_vq_avail_empty()
vhost_net: basic polling support
drivers/vhost/net.c| 79
This patch introduces a helper which will return true if we're sure
that the available ring is empty for a specific vq. When we're not
sure, e.g vq access failure, return false instead. This could be used
for busy polling code to exit the busy loop.
Signed-off-by: Jason Wang <jasow...@redhat.
On 02/28/2016 10:09 PM, Michael S. Tsirkin wrote:
> On Fri, Feb 26, 2016 at 04:42:44PM +0800, Jason Wang wrote:
>> > This patch tries to poll for new added tx buffer or socket receive
>> > queue for a while at the end of tx/rx processing. The maximum time
>> > s
On 02/29/2016 05:56 AM, Christian Borntraeger wrote:
> On 02/26/2016 09:42 AM, Jason Wang wrote:
>> > This patch tries to poll for new added tx buffer or socket receive
>> > queue for a while at the end of tx/rx processing. The maximum time
>> > spent on polling wer
On 02/08/2016 11:14 AM, Vladislav Yasevich wrote:
> This is an RFC series to extend macvtap with multiple qdisc. Right now
> multiqueue macvtap setups suffer from lock contention. Macvtap sets
> the queue index and thus gets a default qdisc allocated to it. Since
> it later users
On 01/20/2016 10:09 PM, Michael S. Tsirkin wrote:
> On Tue, Dec 01, 2015 at 02:39:44PM +0800, Jason Wang wrote:
>> Signed-off-by: Jason Wang <jasow...@redhat.com>
> Wow new API with no comments anywhere, and no
> commit log to say what it's good for.
> Want to know
On 01/20/2016 10:35 PM, Michael S. Tsirkin wrote:
> On Tue, Dec 01, 2015 at 02:39:45PM +0800, Jason Wang wrote:
>> This patch tries to poll for new added tx buffer or socket receive
>> queue for a while at the end of tx/rx processing. The maximum time
>> spent on polling w
On 01/25/2016 03:58 PM, Michael Rapoport wrote:
> (restored 'CC, sorry for dropping it originally, Notes is still hard
> for me)
>
> > Jason Wang <jasow...@redhat.com> wrote on 01/25/2016 05:00:05 AM:
> > On 01/24/2016 05:00 PM, Mike Rapoport wrote:
> > &g
On 03/10/2016 02:48 PM, Michael Rapoport wrote:
> Hi Greg,
>
>> > Greg Kurz <gk...@linux.vnet.ibm.com> wrote on 03/09/2016 09:26:45 PM:
>>> > > On Fri, 4 Mar 2016 06:24:50 -0500
>>> > > Jason Wang <jasow...@redhat.com> wrote:
>> &
%/ +5%/ +5%/ +5%/ -11%
256/ 200/ +4%/ +4%/ +4%/ +4%/ -13%
1024/ 1/0%/ -3%/0%/0%/ -6%
1024/50/ +1%/ +1%/ +1%/ +1%/ -10%
1024/ 100/ +4%/ +4%/ +5%/ +5%/ -11%
1024/ 200/ +4%/ +5%/ +4%/ +4%/ -12%
Signed-off-by: Jason Wang <ja
was enabled. Fixing by not using union for napi_id
and sender_cpu.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/skbuff.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 15d0df9..8aee891
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index afdf950..950faf5 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -69,6 +69,7 @@
#include
#i
This patch factors out core logic of busy polling to
sk_busy_loop_once() in order to be reused by other modules.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/net/busy_poll.h | 7 ++
net/core/dev.c | 59 -
2
This patch exports napi_by_id() which will be used by vhost_net socket
busy polling.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/net/busy_poll.h | 1 +
net/core/dev.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/net/busy_poll.h b/i
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/macvtap.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 95394ed..1891aff 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -20,6 +20,7 @@
#i
%/ -6%
1024/50/ +1%/ +1%/ +1%/ +1%/ -10%
1024/ 100/ +4%/ +4%/ +5%/ +5%/ -11%
1024/ 200/ +4%/ +5%/ +4%/ +4%/ -12%
Thanks
Jason Wang (6):
net: skbuff: don't use union for napi_id and sender_cpu
tuntap: socket rx busy polling support
macvtap: socket rx
On 04/01/2016 09:04 PM, Eric Dumazet wrote:
> On Fri, 2016-04-01 at 12:49 +0800, Jason Wang wrote:
>> On 04/01/2016 10:55 AM, Eric Dumazet wrote:
>>> On Fri, 2016-04-01 at 10:13 +0800, Jason Wang wrote:
>>>
>>>
>>>> The problem is we want to suppo
ix IFF_NO_QUEUE for drivers using alloc_netdev")
Cc: Phil Sutter <p...@nwl.cc>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 510e90a..2c9e45f
.
Thanks
Jason Wang (2):
vhost: convert pre sorted vhost memory array to interval tree
vhost: device IOTLB API
drivers/vhost/net.c| 14 +-
drivers/vhost/vhost.c | 427 +++--
drivers/vhost/vhost.h | 42 -
fs/eventfd.c
userspace finishes the translation, it will update the vhost
IOTLB through VHOST_UPDATE_IOTLB ioctl. Userspace is also in charge of
snooping the IOTLB invalidation of IOMMU IOTLB and use
VHOST_UPDATE_IOTLB to invalidate the possible entry in vhost.
Signed-off-by: Jason Wang <jasow...@redhat.
the userspace to send diffs of
memory table.
- Simplify Device IOTLB implementation.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 8 +--
drivers/vhost/vhost.c | 182 --
drivers/vhost/vhost.h | 27 ++--
3
This path introduces a helper which can give a hint for whether or not
there's a work queued in the work list. This could be used for busy
polling code to exit the busy loop.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.c | 7 +++
drivers/vhost/vhost.h |
for busyloop_timeout
- split out the busy polling logic into a new helper
- check and exit the loop when there's a pending signal
- disable preemption during busy looping to make sure lock_clock() was
correctly used.
Jason Wang (3):
vhost: introduce vhost_has_work()
vhost: introduce
This patch introduces a helper which will return true if we're sure
that the available ring is empty for a specific vq. When we're not
sure, e.g vq access failure, return false instead. This could be used
for busy polling code to exit the busy loop.
Signed-off-by: Jason Wang <jasow...@redhat.
This patch tries to poll for new added tx buffer or socket receive
queue for a while at the end of tx/rx processing. The maximum time
spent on polling were specified through a new kind of vring ioctl.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c
On 03/31/2016 06:32 PM, Eric Dumazet wrote:
> On Thu, 2016-03-31 at 13:50 +0800, Jason Wang wrote:
>> We use a union for napi_id and send_cpu, this is ok for most of the
>> cases except when we want to support busy polling for tun which needs
>> napi_id to be stored and pa
On 04/01/2016 04:01 AM, David Miller wrote:
> From: Eric Dumazet <eric.duma...@gmail.com>
> Date: Thu, 31 Mar 2016 03:32:21 -0700
>
>> On Thu, 2016-03-31 at 13:50 +0800, Jason Wang wrote:
>>> We use a union for napi_id and send_cpu, this is ok for most of the
On 04/01/2016 10:55 AM, Eric Dumazet wrote:
> On Fri, 2016-04-01 at 10:13 +0800, Jason Wang wrote:
>
>
>> The problem is we want to support busy polling for tun. This needs
>> napi_id to be passed to tun socket by sk_mark_napi_id() during
>> tun_net_xmit(). But before
On 04/13/2016 06:26 PM, Michael S. Tsirkin wrote:
> On Wed, Apr 13, 2016 at 11:04:47AM +0200, Paolo Abeni wrote:
>> This patch disables the default qdisc by explicitly setting the
>> IFF_NO_QUEUE private flag so that now the tun xmit path do not
>> require any lock by default.
>>
>> The default
->vlan_features = dev->features &
> ~(NETIF_F_HW_VLAN_CTAG_TX |
> NETIF_F_HW_VLAN_STAG_TX);
Acked-by: Jason Wang <jasow...@redhat.com>
On 04/27/2016 07:28 PM, Michael S. Tsirkin wrote:
> On Tue, Apr 26, 2016 at 03:35:53AM -0400, Jason Wang wrote:
>> We don't stop polling socket during rx processing, this will lead
>> unnecessary wakeups from under layer net devices (E.g
>> sock_def_readable() form tun). R
On 04/27/2016 07:30 PM, Michael S. Tsirkin wrote:
> On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote:
>> > Current pre-sorted memory region array has some limitations for future
>> > device IOTLB conversion:
>> >
>> > 1) need extra work
On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote:
> On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote:
>> This patch tries to implement an device IOTLB for vhost. This could be
>> used with for co-operation with userspace(qemu) implementation of DMA
>> rema
On 04/28/2016 10:43 PM, Michael S. Tsirkin wrote:
> On Thu, Apr 28, 2016 at 02:37:16PM +0800, Jason Wang wrote:
>>
>> On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote:
>>> On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote:
>>>> This patch tries to
On 04/29/2016 09:12 AM, Jason Wang wrote:
> On 04/28/2016 10:43 PM, Michael S. Tsirkin wrote:
>> > On Thu, Apr 28, 2016 at 02:37:16PM +0800, Jason Wang wrote:
>>> >>
>>> >> On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote:
>>>> >>
: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
Changes from V1:
- Fix build when CONFIG_RPS is not set
---
drivers/net/tun.c | 4 +++-
net/core/dev.c| 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drive
On 04/26/2016 09:55 AM, Jason Wang wrote:
> There's no need to calculate rps hash if it was not enabled. So this
> patch export rps_needed and check it before trying to get rps
> hash. Tests (using pktgen to inject packets to guest) shows this can
> improve pps about 13% (when rps
: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 2 +-
net/core/dev.c| 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index afdf950..746877f 100644
--- a/drivers/net
We used to implement the work flushing through tracking queued seq,
done seq, and the number of flushing. This patch simplify this by just
implement work flushing through another kind of vhost work with
completion. This will be used by lockless enqueuing patch.
Signed-off-by: Jason Wang <ja
We use spinlock to synchronize the work list now which may cause
unnecessary contentions. So this patch switch to use llist to remove
this contention. Pktgen tests shows about 5% improvement:
Before:
~130 pps
After:
~137 pps
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
d
is contention. Pktgen tests shows about 5% improvement:
>>
>> Before:
>> ~130 pps
>> After:
>> ~137 pps
>>
>> Signed-off-by: Jason Wang <jasow...@redhat.com>
>> ---
>> drivers/vhost/vhost.c | 52
>> +
On 2016年05月18日 21:01, Eric Dumazet wrote:
On Wed, 2016-05-18 at 18:58 +0800, Jason Wang wrote:
We used to check dev->reg_state against NETREG_REGISTERED after each
time we are woke up. But after commit 9e641bdcfa4e ("net-tun:
restructure tun_do_read for better sleep/wakeup ef
dcfa4e ("net-tun: restructure tun_do_read for better
sleep/wakeup efficiency")
Cc: Eric Dumazet <eduma...@google.com>
Cc: Xi Wang <x...@google.com>
Cc: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
- The patch is needed
This patch introduces vhost memory accessors which were just wrappers
for userspace address access helpers. This is a requirement for vhost
device iotlb implementation which will add iotlb translations in those
accessors.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost
request, this solves the possible deadlock in V1.
- read/write permission check support.
Please review.
Jason Wang (3):
vhost: introduce vhost memory accessors
vhost: convert pre sorted vhost memory array to interval tree
vhost: device IOTLB API
drivers/vhost/net.c| 63 +++-
drivers
the userspace to send diffs of
memory table.
- Simplify Device IOTLB implementation.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 8 +--
drivers/vhost/vhost.c | 182 --
drivers/vhost/vhost.h | 27 ++--
3
happens during vq processing.
In most cases, virtqueue were mapped contiguous even in virtual
address. So the IOTLB translation for virtqueue itself maybe a little
bit slower. We can add fast path on top of this patch.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost
On 2016年05月16日 16:08, Michael S. Tsirkin wrote:
On Mon, May 16, 2016 at 03:52:11PM +0800, Jason Wang wrote:
On 2016年05月16日 12:23, Michael S. Tsirkin wrote:
On Mon, May 16, 2016 at 09:17:01AM +0800, Jason Wang wrote:
We used to queue tx packets in sk_receive_queue, this is less
efficient
pps:
Before: ~148pps
After : ~161pps
(I'm not sure noblocking read is still needed, so it was not included
in this patch)
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
---
drivers/net/tun.c | 157 +---
drivers/vhost/net.c
On 2016年05月16日 12:23, Michael S. Tsirkin wrote:
On Mon, May 16, 2016 at 09:17:01AM +0800, Jason Wang wrote:
We used to queue tx packets in sk_receive_queue, this is less
efficient since it requires spinlocks to synchronize between producer
and consumer.
This patch tries to address
On 2016年05月16日 11:56, Eric Dumazet wrote:
On Mon, 2016-05-16 at 09:17 +0800, Jason Wang wrote:
We used to queue tx packets in sk_receive_queue, this is less
efficient since it requires spinlocks to synchronize between producer
and consumer.
...
struct tun_struct *detached
dcfa4e ("net-tun: restructure tun_do_read for better
sleep/wakeup efficiency")
Cc: Eric Dumazet <eduma...@google.com>
Cc: Xi Wang <x...@google.com>
Cc: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
The patch is needed f
On 2016年05月18日 16:13, Jesper Dangaard Brouer wrote:
On Mon, 16 May 2016 15:51:48 +0800
Jason Wang <jasow...@redhat.com> wrote:
On 2016年05月16日 11:56, Eric Dumazet wrote:
On Mon, 2016-05-16 at 09:17 +0800, Jason Wang wrote:
We used to queue tx packets in sk_receive_queue, this i
On Tue, 17 May 2016 09:38:37 +0800 Jason Wang <jasow...@redhat.com> wrote:
And if tx_queue_length is not power of 2,
we probably need modulus to calculate the capacity.
Is that really that important for speed?
Not sure, I can test.
In my experience, yes, adding a modulus does affect p
On 04/28/2016 02:19 PM, Jason Wang wrote:
> On 04/27/2016 07:28 PM, Michael S. Tsirkin wrote:
>> > On Tue, Apr 26, 2016 at 03:35:53AM -0400, Jason Wang wrote:
>>> >> We don't stop polling socket during rx processing, this will lead
>>> >> unnecessary
On 04/14/2016 05:05 PM, Michael S. Tsirkin wrote:
> On Thu, Apr 14, 2016 at 02:49:28PM +0800, Jason Wang wrote:
>> >
>> >
>> > On 04/13/2016 06:26 PM, Michael S. Tsirkin wrote:
>>> > > On Wed, Apr 13, 2016 at 11:04:47AM +0200, Paolo Abeni wrote:
&g
On 04/14/2016 05:10 PM, Michael S. Tsirkin wrote:
> On Thu, Apr 14, 2016 at 05:07:50PM +0800, Jason Wang wrote:
>>
>> On 04/14/2016 05:05 PM, Michael S. Tsirkin wrote:
>>> On Thu, Apr 14, 2016 at 02:49:28PM +0800, Jason Wang wrote:
>>>>>
>>>>
On 2016年08月11日 16:13, Cornelia Huck wrote:
On Thu, 11 Aug 2016 15:49:12 +0800
Jason Wang <jasow...@redhat.com> wrote:
This looks like a use-after-free. Could you pls try the following patch
to see it if fixes your issue?
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
On 2016年08月11日 00:40, Cornelia Huck wrote:
I'm hitting the following oops during shutdown (halt command in guest)
of a libvirt-managed qemu guest 100% of the time:
[ 108.920486] Unable to handle kernel pointer dereference in virtual kernel
address space
[ 108.920492] Failing address:
lt;cornelia.h...@de.ibm.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/macvtap.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index a38c0da..
We should use kfree_skb() instead of kfree() to free an skb.
Fixes: 362899b8725b ("macvtap: switch to use skb array")
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/macvtap.c | 2 +-
1 file changed, 1 in
We decide the rxq through calculating its hash which is not necessary
if we only have one rx queue. So this patch skip this and just return
queue 0. Test shows 22% improving on guest rx pps.
Before: 1201504 pkts/s
After: 1472731 pkts/s
Signed-off-by: Jason Wang <jasow...@redhat.
This patch switch to use skb array instead of sk_receive_queue to
avoid spinlock contentions. Tests shows about 21% improvements for
guest rx pps:
Before: 1472731 pkts/s
After: 1786289 pkts/s
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/macvtap.
Y_DONE;
+
switch (event) {
case NETDEV_CHANGE_TX_QUEUE_LEN:
if (tun_queue_resize(tun))
Good catch.
Acked-by: Jason Wang <jasow...@redhat.com>
On 2016年07月08日 14:19, Michael S. Tsirkin wrote:
On Wed, Jul 06, 2016 at 01:45:58PM -0400, Craig Gallek wrote:
>On Thu, Jun 30, 2016 at 2:45 AM, Jason Wang<jasow...@redhat.com> wrote:
> >Hi all:
> >
> >This series tries to switch to use skb array in tun. T
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/skb_array.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 2dd0d1e..f4dfade 100644
--- a/i
tab...@intel.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/netdevice.h | 1 +
net/core/net-sysfs.c | 15 ++-
net/core/rtnetlink.c | 16
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/include/linux/netdevice
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 138 +---
drivers/vhost/net.c | 16 +-
include/linux/net.h | 1 +
3 files changed, 146 insertions(+), 9 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net
since test show very minor improvement
Jason Wang (5):
ptr_ring: support zero length ring
skb_array: minor tweak
skb_array: add wrappers for resizing
net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
tun: switch to use skb array for tx
Michael S. Tsirkin (1):
ptr_ring: support resizing multiple
Sometimes, we need zero length ring. But current code will crash since
we don't do any check before accessing the ring. This patch fixes this.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/ptr_ring.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/skb_array.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 678bfbf..2d
From: "Michael S. Tsirkin" <m...@redhat.com>
Sometimes, we need support resizing multiple queues at once. This is
because it was not easy to recover to recover from a partial failure
of multiple queues resizing.
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off
On 2016年06月30日 13:59, Jason Wang wrote:
On 2016年06月30日 13:12, Jason Wang wrote:
On 2016年06月30日 12:56, John Fastabend wrote:
On 16-06-29 08:52 PM, Jason Wang wrote:
This patch introduces a new event - NETDEV_CHANGE_TX_QUEUE_LEN, this
will be triggered when tx_queue_len. It could be used
On 2016年06月30日 23:45, Michael S. Tsirkin wrote:
On Thu, Jun 30, 2016 at 02:45:30PM +0800, Jason Wang wrote:
>Hi all:
>
>This series tries to switch to use skb array in tun. This is used to
>eliminate the spinlock contention between producer and consumer. The
>conversion was
On 2016年06月28日 15:09, Michael S. Tsirkin wrote:
On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote:
On 2016年06月23日 02:18, Michael S. Tsirkin wrote:
On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote:
Would it help to have ptr_ring_resize that gets an array of
rings
Sometimes, we need zero length ring. But current code will crash since
we don't do any check before accessing the ring. This patch fixes this.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/ptr_ring.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
a NETDEV_CHANGE_TX_QUEUE_LEN
- drop new flags
Changes from V1:
- switch to use skb array instead of a customized circular buffer
- add non-blocking support
- rename .peek to .peek_len
- drop lockless peeking since test show very minor improvement
Jason Wang (5):
ptr_ring: support zero length ring
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/skb_array.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 2dd0d1e..f4dfade 100644
--- a/i
On 2016年06月30日 12:56, John Fastabend wrote:
On 16-06-29 08:52 PM, Jason Wang wrote:
This patch introduces a new event - NETDEV_CHANGE_TX_QUEUE_LEN, this
will be triggered when tx_queue_len. It could be used by net device
who want to do some processing at that time. An example is tun who may
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 138 +---
drivers/vhost/net.c | 16 +-
include/linux/net.h | 1 +
3 files changed, 146 insertions(+), 9 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/linux/skb_array.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 678bfbf..2d
This patch introduces a new event - NETDEV_CHANGE_TX_QUEUE_LEN, this
will be triggered when tx_queue_len. It could be used by net device
who want to do some processing at that time. An example is tun who may
want to resize tx array when tx_queue_len is changed.
Signed-off-by: Jason Wang <ja
From: "Michael S. Tsirkin" <m...@redhat.com>
Sometimes, we need support resizing multiple queues at once. This is
because it was not easy to recover to recover from a partial failure
of multiple queues resizing.
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off
On 2016年06月30日 13:12, Jason Wang wrote:
On 2016年06月30日 12:56, John Fastabend wrote:
On 16-06-29 08:52 PM, Jason Wang wrote:
This patch introduces a new event - NETDEV_CHANGE_TX_QUEUE_LEN, this
will be triggered when tx_queue_len. It could be used by net device
who want to do some
On 2016年07月04日 11:15, Stephen Rothwell wrote:
Hi all,
After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
drivers/net/tun.c: In function 'tun_do_read.part.5':
/home/sfr/next/next/drivers/net/tun.c:1491:6: warning: 'err' may be used
return an uninitialized err, fix this.
Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
i
On 2017年01月28日 05:33, John Fastabend wrote:
This adds ndo ops for upper layer objects to request direct DMA from
the network interface into memory "slots". The slots must be DMA'able
memory given by a page/offset/size vector in a packet_ring_buffer
structure.
The PF_PACKET socket interface
On 2017年02月07日 03:29, John Fastabend wrote:
On 17-02-05 11:08 PM, Jason Wang wrote:
On 2017年02月03日 11:16, John Fastabend wrote:
Add support for XDP adjust head by allocating a 256B header region
that XDP programs can grow into. This is only enabled when a XDP
program is loaded.
In order
-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.c | 39 +++
1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 9f11838..bffbeeb 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers
On 2017年02月03日 11:15, John Fastabend wrote:
Factor out qp assignment.
Signed-off-by: John Fastabend <john.r.fastab...@intel.com>
Acked-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 20 +++-
1 file changed, 7 insertions(+), 13 deleti
are different however so
we can not simply reuse the code.
This patch refactors the code path and adds a reset helper routine.
Signed-off-by: John Fastabend <john.r.fastab...@intel.com>
Acked-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_
On 2017年02月03日 11:16, John Fastabend wrote:
Add support for XDP adjust head by allocating a 256B header region
that XDP programs can grow into. This is only enabled when a XDP
program is loaded.
In order to ensure that we do not have to unwind queue headroom push
queue setup below
On 2017年02月06日 12:39, Michael S. Tsirkin wrote:
On Sun, Feb 05, 2017 at 05:36:34PM -0500, David Miller wrote:
From: John Fastabend
Date: Thu, 02 Feb 2017 19:14:05 -0800
This series adds adjust head support for virtio. The following is my
test setup. I use qemu +
On 2017年02月03日 14:19, Ben Serebrin wrote:
From: Benjamin Serebrin
If the number of virtio queue pairs is not equal to the
number of VCPUs, the virtio guest driver doesn't assign
any CPU affinity for the queue interrupts or the xps
aggregation interrupt.
So this in fact
On 2017年02月06日 15:28, Benjamin Serebrin wrote:
On Sun, Feb 5, 2017 at 11:24 PM, Jason Wang<jasow...@redhat.com> wrote:
On 2017年02月03日 14:19, Ben Serebrin wrote:
From: Benjamin Serebrin<sereb...@google.com>
If the number of virtio queue pairs is not equal to the
number of VCPUs
in virtio_net. To do this we
use the following pattern,
_foo(...) { do stuff }
foo(...) { rtnl_lock(); _foo(...); rtnl_unlock()};
this allows us to use freeze()/restore() flow from both contexts.
Signed-off-by: John Fastabend <john.r.fastab...@intel.com>
Acked-by: Jason Wang
On 2017年02月03日 11:15, John Fastabend wrote:
At this point the do_xdp_prog is mostly if/else branches handling
the different modes of virtio_net. So remove it and handle running
the program in the per mode handlers.
Signed-off-by: John Fastabend <john.r.fastab...@intel.com>
Acked-by:
On 2017年01月25日 12:02, John Fastabend wrote:
On 17-01-24 07:23 PM, Michael S. Tsirkin wrote:
On Wed, Jan 25, 2017 at 10:57:12AM +0800, Jason Wang wrote:
On 2017年01月25日 04:08, Michael S. Tsirkin wrote:
On Tue, Jan 24, 2017 at 02:43:28PM -0500, David Miller wrote:
From: "Michael S. Tsirk
101 - 200 of 1011 matches
Mail list logo