)
Reported-by: Eric Dumazet <eric.duma...@gmail.com>
Cc: Eric Dumazet <eric.duma...@gmail.com>
Cc: Willem de Bruijn <will...@google.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
On 2017年12月08日 21:13, Andreas Hartmann wrote:
On 12/08/2017 at 01:58 PM Michal Kubecek wrote:
On Fri, Dec 08, 2017 at 01:45:38PM +0100, Andreas Hartmann wrote:
On 12/08/2017 at 12:40 PM Michal Kubecek wrote:
On Fri, Dec 08, 2017 at 11:31:50AM +0100, Andreas Hartmann wrote:
When will there
This patch introduces an eBPF based queue selection method. With this,
the policy could be offloaded to userspace completely through a new
ioctl TUNSETSTEERINGEBPF.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
Changes from V2:
- call rtnl during netdev free
- switch to use ca
On 2017年12月01日 22:37, Michael S. Tsirkin wrote:
On Fri, Dec 01, 2017 at 03:11:05PM +0800, Jason Wang wrote:
On 2017年12月01日 13:54, w...@redhat.com wrote:
From: Wei Xu <w...@redhat.com>
Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch d
the regression I saw was tested with event idx on. And
virtqueue_disable_cb() does almost nothing for event idx (or even a
little bit slower).
The patch looks good.
Acked-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 9 ++---
1 file changed, 6 insertions(+)
On 2017年12月06日 10:53, Michael S. Tsirkin wrote:
On Wed, Dec 06, 2017 at 10:31:39AM +0800, Jason Wang wrote:
On 2017年12月06日 03:29, Michael S. Tsirkin wrote:
Users of ptr_ring expect that it's safe to give the
data structure a pointer and have it be available
to consumers, but that actually
.
Reported-by: George Cherian <george.cher...@cavium.com>
Suggested-by: Jason Wang <jasow...@redhat.com>
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
---
George, could you pls report whether this patch fixes
the issue for you?
This seems to be needed in stable as well.
On 2017年12月06日 01:02, David Miller wrote:
From: Jason Wang <jasow...@redhat.com>
Date: Mon, 4 Dec 2017 17:31:23 +0800
This patch introduces an eBPF based queue selection method. With this,
the policy could be offloaded to userspace completely through a new
ioctl TUNSETSTEERINGEBPF.
tfile = rcu_dereference(tun->tfiles[txq]);
- numqueues = READ_ONCE(tun->numqueues);
/* Drop packet if interface is not attached */
- if (txq >= numqueues)
+ if (txq >= tun->numqueues)
goto drop;
if (!rcu_dereference(tun-
goto err_put;
+ }
dev_put(tap->dev);
rtnl_unlock();
return err;
-err_queue:
- skb_array_cleanup(>skb_array);
-err_array:
+err_put:
sock_put(>sk);
err:
if (tap)
Acked-by: Jason Wang <jasow...@redhat.com>
This patch is needed for -stable.
Thanks
On 2017年10月26日 03:01, Eric Dumazet wrote:
On Wed, Oct 25, 2017 at 11:49 AM, Willem de Bruijn
wrote:
From skb->dev and netdev_priv, the tun device has flags 0x1002 ==
IFF_TAP | IFF_NO_PI. This kernel precedes the recent support for
IFF_NAPI and
On 2017年10月25日 05:41, Girish Moodalbail wrote:
Double free of skb_array in tap module is causing kernel panic. When
tap_set_queue() fails we free skb_array right away by calling
skb_array_cleanup(). However, later on skb_array_cleanup() is called
again by tap_sock_destruct through sock_put().
On 2017年10月31日 15:07, Wei Xu wrote:
BTW, did you see any improvement when running pktgen from the host if no
regression was found? Since this can be reproduced with only 1 vcpu for
guest, may you try this bind? This might help simplify the problem.
vcpu0 -> cpu2
vhost -> cpu3
pktgen
ew Rosato <mjros...@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 68677d9..286c3e4 100644
--- a/drivers/vhost/net
This patch introduces an eBPF based queue selection method based on
the flow steering policy ops. Userspace could load an eBPF program
through TUNSETSTEERINGEBPF. This gives much more flexibility compare
to simple but hard coded policy in kernel.
Signed-off-by: Jason Wang <jasow...@redhat.
This patch introduces new ioctl for change packet steering policy for
tun. Only automatic flow steering is supported, more policies will
come.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 35 ++-
include/uapi/linux/if
-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 85 +--
1 file changed, 63 insertions(+), 22 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index ea29da9..bff6259 100644
--- a/drivers/net/tun.c
+++ b/drivers/net
processor id example, implement an eBPF based queue selection
policy instead
Jason Wang (3):
tun: abstract flow steering logic
tun: introduce ioctls to set and get steering policies
tun: add eBPF based queue selection method
drivers/net/tun.c | 197
On 2018年05月09日 10:50, Cong Wang wrote:
On Mon, May 7, 2018 at 11:04 PM, Eric Dumazet wrote:
On 05/07/2018 10:54 PM, Cong Wang wrote:
Yeah, we should return early before hitting this uninitialized ptr ring...
Something like:
diff --git a/drivers/net/tun.c
On 2018年05月08日 11:05, Jason Wang wrote:
Because in virtqueue_enable_cb_delayed(), we may set an
event_off which is bigger than new and both of them have
wrapped. And in this case, although new is smaller than
event_off (i.e. the third param -- old), new shouldn't
add vq->num, and actually
On 2018年05月03日 21:54, Tiwei Bie wrote:
On Thu, May 03, 2018 at 03:25:29PM +0800, Jason Wang wrote:
On 2018年05月03日 10:09, Tiwei Bie wrote:
So how about we use the straightforward way then?
You mean we do new += vq->vring_packed.num instead
of event_idx -= vq->vring_packed.num before c
On 2018年05月09日 00:21, Kirill Tkhai wrote:
Since net ns of tun device is assigned on the device creation,
and it never changes, we do not need to use any lock to get it
from alive tun.
Signed-off-by: Kirill Tkhai
---
drivers/net/tun.c | 18 +++---
1 file
On 2018年05月08日 17:44, Tiwei Bie wrote:
On Tue, May 08, 2018 at 05:34:40PM +0800, Jason Wang wrote:
On 2018年05月08日 17:16, Tiwei Bie wrote:
On Tue, May 08, 2018 at 03:16:53PM +0800, Jason Wang wrote:
On 2018年05月08日 14:44, Tiwei Bie wrote:
On Tue, May 08, 2018 at 01:40:40PM +0800, Jason Wang
;).
Reported-by: syzbot+e8b902c3c3fadf0a9...@syzkaller.appspotmail.com
Cc: Eric Dumazet <eric.duma...@gmail.com>
Cc: Cong Wang <xiyou.wangc...@gmail.com>
Cc: Michael S. Tsirkin <m...@redhat.com>
Fixes: 1576d9860599 ("tun: switch to use skb array for tx")
Signed-off-by: Jason Wa
On 2018年05月08日 14:44, Tiwei Bie wrote:
On Tue, May 08, 2018 at 01:40:40PM +0800, Jason Wang wrote:
On 2018年05月08日 11:05, Jason Wang wrote:
Because in virtqueue_enable_cb_delayed(), we may set an
event_off which is bigger than new and both of them have
wrapped. And in this case, although new
On 2018年05月08日 17:16, Tiwei Bie wrote:
On Tue, May 08, 2018 at 03:16:53PM +0800, Jason Wang wrote:
On 2018年05月08日 14:44, Tiwei Bie wrote:
On Tue, May 08, 2018 at 01:40:40PM +0800, Jason Wang wrote:
On 2018年05月08日 11:05, Jason Wang wrote:
Because in virtqueue_enable_cb_delayed(), we may set
On 2018年05月09日 17:00, Kirill Tkhai wrote:
Hi, Jason,
On 09.05.2018 10:18, Jason Wang wrote:
On 2018年05月09日 00:21, Kirill Tkhai wrote:
Since net ns of tun device is assigned on the device creation,
and it never changes, we do not need to use any lock to get it
from alive tun.
Signed-off
On 2018年04月28日 09:51, Kevin Easton wrote:
On Fri, Apr 27, 2018 at 09:07:56PM -0400, Kevin Easton wrote:
On Fri, Apr 27, 2018 at 07:05:45PM +0300, Michael S. Tsirkin wrote:
On Fri, Apr 27, 2018 at 11:45:02AM -0400, Kevin Easton wrote:
The struct vhost_msg within struct vhost_msg_node is
On 2018年04月27日 17:12, Tiwei Bie wrote:
On Fri, Apr 27, 2018 at 02:17:51PM +0800, Jason Wang wrote:
On 2018年04月27日 12:18, Michael S. Tsirkin wrote:
On Fri, Apr 27, 2018 at 11:56:05AM +0800, Jason Wang wrote:
On 2018年04月25日 13:15, Tiwei Bie wrote:
Hello everyone,
This RFC implements packed
On 2018年04月27日 12:18, Michael S. Tsirkin wrote:
On Fri, Apr 27, 2018 at 11:56:05AM +0800, Jason Wang wrote:
On 2018年04月25日 13:15, Tiwei Bie wrote:
Hello everyone,
This RFC implements packed ring support in virtio driver.
Some simple functional tests have been done with Jason's
packed ring
On 2018年05月10日 16:56, Tiwei Bie wrote:
On Thu, May 10, 2018 at 03:34:50PM +0800, Jason Wang wrote:
On 2018年05月10日 15:32, Jason Wang wrote:
On 2018年04月25日 13:15, Tiwei Bie wrote:
+ /* We're using some buffers from the free list. */
+ vq->vq.num_free -= descs_used;
+
+ /* Update f
On 2018年04月25日 13:15, Tiwei Bie wrote:
+ /* We're using some buffers from the free list. */
+ vq->vq.num_free -= descs_used;
+
+ /* Update free pointer */
+ if (indirect) {
+ n = head + 1;
+ if (n >= vq->vring_packed.num) {
+
On 2018年05月10日 15:32, Jason Wang wrote:
On 2018年04月25日 13:15, Tiwei Bie wrote:
+ /* We're using some buffers from the free list. */
+ vq->vq.num_free -= descs_used;
+
+ /* Update free pointer */
+ if (indirect) {
+ n = head + 1;
+ if (n >= vq->vring_p
On 2018年05月12日 01:39, Cong Wang wrote:
On Thu, May 10, 2018 at 7:49 PM, Jason Wang <jasow...@redhat.com> wrote:
static void __tun_detach(struct tun_file *tfile, bool clean)
{
struct tun_file *ntfile;
@@ -736,7 +727,8 @@ static void __tun_detach(struct tun_file *tfile, bool
;).
Reported-by: syzbot+e8b902c3c3fadf0a9...@syzkaller.appspotmail.com
Cc: Eric Dumazet <eric.duma...@gmail.com>
Cc: Cong Wang <xiyou.wangc...@gmail.com>
Cc: Michael S. Tsirkin <m...@redhat.com>
Fixes: 1576d9860599 ("tun: switch to use skb array for tx")
Signed-off-by: Jason Wa
On 2018年05月11日 02:08, Cong Wang wrote:
On Tue, May 8, 2018 at 11:59 PM, Jason Wang <jasow...@redhat.com> wrote:
We used to initialize ptr_ring during TUNSETIFF, this is because its
size depends on the tx_queue_len of netdevice. And we try to clean it
up when socket were detache
On 2018年05月17日 10:55, David Ahern wrote:
On 5/16/18 1:24 AM, Jason Wang wrote:
On 2018年05月16日 11:51, David Ahern wrote:
Hi Jason:
I am trying to test MTU changes to the BPF fib_lookup helper and seeing
something odd. Hoping you can help.
I have a VM with multiple virtio based NICs and tap
tun_detach().
Could you help to test the attached patch?
Thanks
>From 4b5ad75208e379dcb32abb9ac4790a0446f8558b Mon Sep 17 00:00:00 2001
From: Jason Wang <jasow...@redhat.com>
Date: Wed, 16 May 2018 15:26:52 +0800
Subject: [PATCH] tuntap: fix use after free during release
After commit b196
On 2018年05月16日 11:51, David Ahern wrote:
Hi Jason:
I am trying to test MTU changes to the BPF fib_lookup helper and seeing
something odd. Hoping you can help.
I have a VM with multiple virtio based NICs and tap backends. I install
the xdp program on eth1 and eth2 to do forwarding. In the
On 2018年05月16日 15:40, Andrei Vagin wrote:
On Wed, May 16, 2018 at 03:32:59PM +0800, Jason Wang wrote:
On 2018年05月16日 15:12, Andrei Vagin wrote:
Hi Jason,
I think the problem is in "tun: hold a tun socket during ptr_ring_cleanup".
Pls take a look at the attached patch.
Yes.
It l
On 2018年05月17日 21:45, DaeRyong Jeong wrote:
We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter
This crash has been found in v4.17-rc1 using RaceFuzzer (a modified
version of Syzkaller), which we describe more at the end of this
report. Our analysis shows that the race
On 2018年05月16日 22:33, Tiwei Bie wrote:
On Wed, May 16, 2018 at 10:05:44PM +0800, Jason Wang wrote:
On 2018年05月16日 21:45, Tiwei Bie wrote:
On Wed, May 16, 2018 at 08:51:43PM +0800, Jason Wang wrote:
On 2018年05月16日 20:39, Tiwei Bie wrote:
On Wed, May 16, 2018 at 07:50:16PM +0800, Jason Wang
On 2018年05月16日 21:45, Tiwei Bie wrote:
On Wed, May 16, 2018 at 08:51:43PM +0800, Jason Wang wrote:
On 2018年05月16日 20:39, Tiwei Bie wrote:
On Wed, May 16, 2018 at 07:50:16PM +0800, Jason Wang wrote:
On 2018年05月16日 16:37, Tiwei Bie wrote:
[...]
struct vring_virtqueue {
@@ -116,6 +117,9
Two helpers of setting/getting used len were introduced to avoid
explicitly manipulating vhost_used_elem in zerocopy code. This will be
used to hide used_elem internals and simplify packed ring
implementation.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c
Move get_rx_bufs() to vhost.c and rename it to
vhost_get_bufs(). This helps to hide vring internal layout from
specific device implementation. Packed ring implementation will
benefit from this.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c
On 2018年05月16日 16:37, Tiwei Bie wrote:
This commit introduces the basic support (without EVENT_IDX)
for packed ring.
Signed-off-by: Tiwei Bie
---
drivers/virtio/virtio_ring.c | 491 ++-
1 file changed, 481 insertions(+), 10 deletions(-)
On 2018年05月16日 16:37, Tiwei Bie wrote:
This commit introduces the event idx support in
packed ring.
Signed-off-by: Tiwei Bie
---
drivers/virtio/virtio_ring.c | 75 +---
1 file changed, 70 insertions(+), 5 deletions(-)
diff --git
pile test only).
- Fix several bugs
Jason Wang (8):
vhost: move get_rx_bufs to vhost.c
vhost: hide used ring layout from device
vhost: do not use vring_used_elem
vhost_net: do not explicitly manipulate vhost_used_elem
vhost: vhost_put_user() can accept metadata type
virtio: introduce pa
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
include/uapi/linux/virtio_config.h | 9 +
include/uapi/linux/virtio_ring.h | 13 +
2 files changed, 22 insertions(+)
diff --git a/include/uapi/linux/virtio_config.h
b/include/uapi/linux/virtio_config.h
index 3
reference of the socket in __tun_detach().
Reported-by: Andrei Vagin <ava...@virtuozzo.com>
Acked-by: Andrei Vagin <ava...@virtuozzo.com>
Fixes: b196d88aba8a ("tun: fix use after free for ptr_ring")
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun
On 2018年05月16日 20:58, Tiwei Bie wrote:
On Wed, May 16, 2018 at 08:17:21PM +0800, Jason Wang wrote:
On 2018年05月16日 16:37, Tiwei Bie wrote:
[...]
@@ -1160,15 +1186,27 @@ static void virtqueue_disable_cb_packed(struct
virtqueue *_vq)
static unsigned virtqueue_enable_cb_prepare_packed
Instead of depending on the exported vring_used_elem, this patch
switches to use a new internal structure vhost_used_elem which embed
vring_used_elem in itself. This could be used to let vhost to record
extra metadata for the incoming packed ring layout.
Signed-off-by: Jason Wang <ja
We assumes used ring update is the only user for vhost_put_user() in
the past. This may not be the case for the incoming packed ring which
may update the descriptor ring for used. So introduce a new type
parameter.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.
This patch introduces basic support for event suppression aka driver
and device area.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.c| 168 ---
drivers/vhost/vhost.h| 10 ++-
include/uapi/linux/virtio_
by
- letting vhost_get_vq_desc() return pointer to struct vring_used_elem
- accepting pointer to struct vring_used_elem in vhost_add_used() and
vhost_add_used_and_signal()
This could help to hide used ring layout and make it easier to
implement packed ring on top.
Signed-off-by: Jason Wang <ja
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 3 +-
drivers/vhost/vhost.c | 539 ++
drivers/vhost/vhost.h | 8 +-
3 files changed, 513 insertions(+), 37 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers
On 2018年05月16日 20:39, Tiwei Bie wrote:
On Wed, May 16, 2018 at 07:50:16PM +0800, Jason Wang wrote:
On 2018年05月16日 16:37, Tiwei Bie wrote:
[...]
struct vring_virtqueue {
@@ -116,6 +117,9 @@ struct vring_virtqueue {
/* Last written value to driver->fl
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 15d191a..de544ee 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -479,6 +
Instead of mixing zerocopy and datacopy logics, this patch tries to
split datacopy logic out. This results for a more compact code and
specific optimization could be done on top more easily.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index de544ee..4ebac76 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -485,6 +
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index c4b49fc..15d191a 100644
--- a/drivers/vhost/net.c
+++ b/drivers
doing xdp_redirect_map between TAP and ixgbe.
Thanks
Jason Wang (12):
vhost_net: introduce helper to initialize tx iov iter
vhost_net: introduce vhost_exceeds_weight()
vhost_net: introduce vhost_has_more_pkts()
vhost_net: split out datacopy logic
vhost_net: batch update used ring
XDP buff to TUN. This could be used to implement accepting an array of
XDP buffs from vhost_net in the following patches.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 91 +-
drivers/vhost/net.c
.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 36 +--
drivers/vhost/net.c | 71 -
2 files changed, 71 insertions(+), 36 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index b
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 44d4f3d..24ecd82 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1697,6 +1697,8 @@ static
to 3.2Mpps.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 4682fcc..f0639d7 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
headroom based on the TUN XDP.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 74 +
1 file changed, 74 insertions(+)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index f0639d7..1209e84 100644
--- a/d
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 36 ++--
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 24ecd82..f6e0f96 100644
--- a/drivers/net/tun.c
+++ b/drivers/net
If we're sure not to go native XDP, there's no need for several things
like touching preemption counter and rcu stuffs.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tun.c b/d
This patch split out XDP logic into a single function. This make it to
be reused by XDP batching path in the following patch.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c | 85 +--
1 file changed, 51 insertions(
On 2018年05月22日 00:39, Jesse Brandeburg wrote:
On Mon, 21 May 2018 17:04:24 +0800 Jason wrote:
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost
-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 111 +++-
1 file changed, 102 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 4ebac76..4682fcc 100644
--- a/drivers/vhost/net.c
and then can disable premmption for several XDP buffs to achieve
batching from XDP.
TODO: reserve headroom based on the TUN XDP.
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 74 +
1 file changed, 74 inse
m, fixing by protecting
vhost_process_iotlb_msg() with dev mutex.
Reported-by: DaeRyong Jeong <threeear...@gmail.com>
Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API")
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/vhost.c | 3 +++
1 file changed, 3 insertions
On 2018年05月22日 00:29, Jesse Brandeburg wrote:
On Mon, 21 May 2018 17:04:23 +0800 Jason wrote:
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost
On 2018年05月22日 00:24, Jesse Brandeburg wrote:
Hi Jason, a few nits.
On Mon, 21 May 2018 17:04:22 +0800 Jason wrote:
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
On 2018年05月21日 22:59, Michael S. Tsirkin wrote:
On Mon, May 21, 2018 at 04:35:05PM +0800, Jason Wang wrote:
If we successfully linearize the packets, num_buf were set to zero
which was wrong since we now have only 1 buffer to be used for e.g in
the error path of receive_mergeable(). Zero
On 2018年05月21日 22:42, Michael S. Tsirkin wrote:
On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote:
On 2018年05月18日 17:24, Jason Wang wrote:
On 2018年05月17日 21:45, DaeRyong Jeong wrote:
We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter
This crash has been found
On 2018年05月22日 06:08, Michael S. Tsirkin wrote:
On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote:
From: Jason Wang <jasow...@redhat.com>
Date: Fri, 18 May 2018 21:00:43 +0800
We return -EIO on device down but can not raise EPOLLOUT after it was
up. This may confuse use
On 2018年05月21日 23:01, Michael S. Tsirkin wrote:
On Mon, May 21, 2018 at 04:35:06PM +0800, Jason Wang wrote:
We need to drop refcnt to xdp_page if we see a gso packet. Otherwise
it will be leaked. Fixing this by moving the check of gso packet above
the linearizing logic.
Cc: John Fastabend
("virtio-net: do not reset during XDP set")
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6260d65..326e247 100644
--- a/drivers/
t: xdp, add slowpath case for non contiguous
buffers")
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3
("virtio_net: xdp, add slowpath case for non contiguous
buffers")
Cc: John Fastabend <john.fastab...@gmail.com>
Acked-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+
)
Reported-by: David Ahern <dsah...@gmail.com>
Tested-by: David Ahern <dsah...@gmail.com>
Acked-by: Michael S. Tsirkin <m...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Hi:
Please review the patches that tries to fix sevreal issues of
virtio-net mergeable XDP.
Changes from V1:
- check against 1 before decreasing instead of resetting to 1
- typoe fixes
Jason Wang (4):
virtio-net: correctly redirect linearized packet
virtio-net: correctly transmit XDP buff
On 2018年05月22日 11:46, Michael S. Tsirkin wrote:
On Tue, May 22, 2018 at 11:22:11AM +0800, Jason Wang wrote:
On 2018年05月22日 06:08, Michael S. Tsirkin wrote:
On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote:
From: Jason Wang <jasow...@redhat.com>
Date: Fri, 18 May 2018 21
On 2018年05月23日 15:17, Wei Xu wrote:
On Wed, May 23, 2018 at 09:39:28AM +0800, Jason Wang wrote:
On 2018年05月23日 00:54, Wei Xu wrote:
On Wed, May 16, 2018 at 08:32:20PM +0800, Jason Wang wrote:
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 3 +-
d
On 2018年05月23日 00:54, Wei Xu wrote:
On Wed, May 16, 2018 at 08:32:20PM +0800, Jason Wang wrote:
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/vhost/net.c | 3 +-
drivers/vhost/vhost.c | 539 ++
drivers/vhost/vhost.h
On 2018年05月25日 12:32, Toshiaki Makita wrote:
Calling XDP redirection requires preempt/bh disabled. Especially softirq
can call another XDP function and redirection functions, then percpu
value ri->map can be overwritten to NULL.
This is a generic XDP case called from tun.
[ 3535.736058] BUG:
On 2018年05月16日 20:32, Jason Wang wrote:
+static bool vhost_notify_packed(struct vhost_dev *dev,
+ struct vhost_virtqueue *vq)
+{
+ __virtio16 event_off_wrap, event_flags;
+ __u16 old, new, off_wrap;
+ bool v;
+
+ /* Flush out used
On 2018年05月22日 16:16, Tiwei Bie wrote:
Hello everyone,
This RFC implements packed ring support in virtio driver.
Some simple functional tests have been done with Jason's
packed ring implementation in vhost (RFC v4):
https://lkml.org/lkml/2018/5/16/501
Both of ping and netperf worked as
On 2018年05月18日 22:06, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 10:00:31PM +0800, Jason Wang wrote:
On 2018年05月18日 21:26, Jason Wang wrote:
On 2018年05月18日 21:13, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 09:00:43PM +0800, Jason Wang wrote:
We return -EIO on device down
On 2018年05月18日 19:29, Tiwei Bie wrote:
On Thu, May 17, 2018 at 08:01:52PM +0800, Jason Wang wrote:
On 2018年05月16日 22:33, Tiwei Bie wrote:
On Wed, May 16, 2018 at 10:05:44PM +0800, Jason Wang wrote:
On 2018年05月16日 21:45, Tiwei Bie wrote:
On Wed, May 16, 2018 at 08:51:43PM +0800, Jason Wang
On 2018年05月18日 21:13, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 09:00:43PM +0800, Jason Wang wrote:
We return -EIO on device down but can not raise EPOLLOUT after it was
up. This may confuse user like vhost which expects tuntap to raise
EPOLLOUT to re-enable its TX routine after
On 2018年05月18日 21:26, Jason Wang wrote:
On 2018年05月18日 21:13, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 09:00:43PM +0800, Jason Wang wrote:
We return -EIO on device down but can not raise EPOLLOUT after it was
up. This may confuse user like vhost which expects tuntap to raise
. Fixing this by set SOCKWQ_ASYNC_NOSPACE on -EIO.
Cc: Hannes Frederic Sowa <han...@stressinduktion.org>
Cc: Eric Dumazet <eduma...@google.com>
Fixes: 1bd4978a88ac2 ("tun: honor IFF_UP in tun_get_user()")
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
drivers/net/tun.c
On 2018年05月18日 22:46, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 10:11:54PM +0800, Jason Wang wrote:
On 2018年05月18日 22:06, Michael S. Tsirkin wrote:
On Fri, May 18, 2018 at 10:00:31PM +0800, Jason Wang wrote:
On 2018年05月18日 21:26, Jason Wang wrote:
On 2018年05月18日 21:13, Michael S
On 2018年05月18日 22:33, Tiwei Bie wrote:
On Fri, May 18, 2018 at 09:17:05PM +0800, Jason Wang wrote:
On 2018年05月18日 19:29, Tiwei Bie wrote:
On Thu, May 17, 2018 at 08:01:52PM +0800, Jason Wang wrote:
On 2018年05月16日 22:33, Tiwei Bie wrote:
On Wed, May 16, 2018 at 10:05:44PM +0800, Jason Wang
On 2018年04月25日 13:15, Tiwei Bie wrote:
This commit introduces the event idx support in packed
ring. This feature is temporarily disabled, because the
implementation in this patch may not work as expected,
and some further discussions on the implementation are
needed, e.g. do we have to check
On 2018年05月21日 00:25, Wei Xu wrote:
On Wed, May 16, 2018 at 08:32:13PM +0800, Jason Wang wrote:
Hi all:
This RFC implement packed ring layout. The code were tested with
Tiwei's RFC V3 ahttps://lkml.org/lkml/2018/4/25/34. Some fixups and
tweaks were needed on top of Tiwei's code to make
601 - 700 of 1011 matches
Mail list logo