Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Tiwei Bie
On Fri, Nov 30, 2018 at 11:46:57AM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 01, 2018 at 12:24:16AM +0800, Tiwei Bie wrote: > > On Fri, Nov 30, 2018 at 10:53:07AM -0500, Michael S. Tsirkin wrote: > > > On Fri, Nov 30, 2018 at 11:37:37PM +0800, Tiwei Bie wrote: > > > > On Fri, Nov 30, 2018 at

Re: [PATCH net] virtio-net: keep vnet header zeroed after processing XDP

2018-11-30 Thread David Miller
From: Jason Wang Date: Thu, 29 Nov 2018 13:53:16 +0800 > We copy vnet header unconditionally in page_to_skb() this is wrong > since XDP may modify the packet data. So let's keep a zeroed vnet > header for not confusing the conversion between vnet header and skb > metadata. > > In the future, we

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Michael S. Tsirkin
On Sat, Dec 01, 2018 at 12:24:16AM +0800, Tiwei Bie wrote: > On Fri, Nov 30, 2018 at 10:53:07AM -0500, Michael S. Tsirkin wrote: > > On Fri, Nov 30, 2018 at 11:37:37PM +0800, Tiwei Bie wrote: > > > On Fri, Nov 30, 2018 at 08:52:42AM -0500, Michael S. Tsirkin wrote: > > > > On Fri, Nov 30, 2018 at

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Tiwei Bie
On Fri, Nov 30, 2018 at 10:53:07AM -0500, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 11:37:37PM +0800, Tiwei Bie wrote: > > On Fri, Nov 30, 2018 at 08:52:42AM -0500, Michael S. Tsirkin wrote: > > > On Fri, Nov 30, 2018 at 02:01:06PM +0100, Maxime Coquelin wrote: > > > > On 11/30/18 1:47

[PATCH v2] vhost: fix IOTLB locking

2018-11-30 Thread Jean-Philippe Brucker
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 11:37:37PM +0800, Tiwei Bie wrote: > On Fri, Nov 30, 2018 at 08:52:42AM -0500, Michael S. Tsirkin wrote: > > On Fri, Nov 30, 2018 at 02:01:06PM +0100, Maxime Coquelin wrote: > > > On 11/30/18 1:47 PM, Michael S. Tsirkin wrote: > > > > On Fri, Nov 30, 2018 at 05:53:40PM

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Tiwei Bie
On Fri, Nov 30, 2018 at 08:52:42AM -0500, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 02:01:06PM +0100, Maxime Coquelin wrote: > > On 11/30/18 1:47 PM, Michael S. Tsirkin wrote: > > > On Fri, Nov 30, 2018 at 05:53:40PM +0800, Tiwei Bie wrote: > > > > On Fri, Nov 30, 2018 at 04:10:55PM

Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jean-Philippe Brucker
On 30/11/2018 13:32, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 11:37:02AM +, Jean-Philippe Brucker wrote: >> Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq >> lock to improve scalability, but introduced a possible deadlock in >> vhost-iotlb.

Re: [PULL] vhost: cleanups and fixes

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 11:01:03AM -0800, Bijan Mottahedeh wrote: > On 11/30/2018 5:44 AM, Michael S. Tsirkin wrote: > > On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote: > > > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook wrote: > > > > + memset(, 0, sizeof(rsp)); > > > > +

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 02:01:06PM +0100, Maxime Coquelin wrote: > > > On 11/30/18 1:47 PM, Michael S. Tsirkin wrote: > > On Fri, Nov 30, 2018 at 05:53:40PM +0800, Tiwei Bie wrote: > > > On Fri, Nov 30, 2018 at 04:10:55PM +0800, Jason Wang wrote: > > > > > > > > On 2018/11/21 下午6:03, Tiwei Bie

Re: [PULL] vhost: cleanups and fixes

2018-11-30 Thread Michael S. Tsirkin
On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote: > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook wrote: > > > > + memset(, 0, sizeof(rsp)); > > + rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED; > > + resp = vq->iov[out].iov_base; > > + ret = __copy_to_user(resp,

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 09:10:03PM +0800, Jason Wang wrote: > > On 2018/11/30 下午8:55, Jason Wang wrote: > > > > On 2018/11/30 下午8:52, Michael S. Tsirkin wrote: > > > > >    If you want to compare it with > > > > > something that would be TCP or QUIC.  The fundamental > > > > > difference between

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 08:55:17PM +0800, Jason Wang wrote: > > On 2018/11/30 下午8:52, Michael S. Tsirkin wrote: > > > >If you want to compare it with > > > > something that would be TCP or QUIC. The fundamental difference between > > > > virtio-vsock and e.g. TCP is that TCP operates in a

Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 11:37:02AM +, Jean-Philippe Brucker wrote: > Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq > lock to improve scalability, but introduced a possible deadlock in > vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding > the

Re: [PATCH 0/5] VSOCK: support mergeable rx buffer in vhost-vsock

2018-11-30 Thread Jason Wang
On 2018/11/29 下午10:19, Stefan Hajnoczi wrote: On Tue, Nov 06, 2018 at 01:53:54PM +0800, jiangyiwen wrote: On 2018/11/6 11:32, Jason Wang wrote: On 2018/11/6 上午11:17, jiangyiwen wrote: On 2018/11/6 10:41, Jason Wang wrote: On 2018/11/6 上午10:17, jiangyiwen wrote: On 2018/11/5 17:21, Jason

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Jason Wang
On 2018/11/30 下午8:55, Jason Wang wrote: On 2018/11/30 下午8:52, Michael S. Tsirkin wrote:    If you want to compare it with something that would be TCP or QUIC.  The fundamental difference between virtio-vsock and e.g. TCP is that TCP operates in a packet loss environment. So they are using

Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jason Wang
On 2018/11/30 下午7:37, Jean-Philippe Brucker wrote: Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Jason Wang
On 2018/11/30 下午8:52, Michael S. Tsirkin wrote: If you want to compare it with something that would be TCP or QUIC. The fundamental difference between virtio-vsock and e.g. TCP is that TCP operates in a packet loss environment. So they are using timers for reliability, and receiver is

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 08:45:39PM +0800, Jason Wang wrote: > > On 2018/11/29 下午10:00, Michael S. Tsirkin wrote: > > On Thu, Nov 15, 2018 at 04:24:38PM +0800, Jason Wang wrote: > > > On 2018/11/15 下午3:04, Michael S. Tsirkin wrote: > > > > On Thu, Nov 15, 2018 at 11:56:03AM +0800, jiangyiwen

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 05:53:40PM +0800, Tiwei Bie wrote: > On Fri, Nov 30, 2018 at 04:10:55PM +0800, Jason Wang wrote: > > > > On 2018/11/21 下午6:03, Tiwei Bie wrote: > > > Add types and macros for packed ring. > > > > > > Signed-off-by: Tiwei Bie > > > --- > > >

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-11-30 Thread Jason Wang
On 2018/11/29 下午10:00, Michael S. Tsirkin wrote: On Thu, Nov 15, 2018 at 04:24:38PM +0800, Jason Wang wrote: On 2018/11/15 下午3:04, Michael S. Tsirkin wrote: On Thu, Nov 15, 2018 at 11:56:03AM +0800, jiangyiwen wrote: Hi Stefan, Michael, Jason and everyone, Several days ago, I discussed with

[PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jean-Philippe Brucker
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken

Re: [REBASE PATCH net-next v9 1/4] net: vhost: lock the vqs one by one

2018-11-30 Thread Jean-Philippe Brucker
On 30/11/2018 02:34, Jason Wang wrote: > > On 2018/11/30 上午3:28, Jean-Philippe Brucker wrote: >> Hi, >> >> On 25/09/2018 13:36,xiangxia.m@gmail.com wrote: >>> From: Tonghao Zhang >>> >>> This patch changes the way that lock all vqs >>> at the same, to lock them one by one. It will >>> be

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Tiwei Bie
On Fri, Nov 30, 2018 at 04:10:55PM +0800, Jason Wang wrote: > > On 2018/11/21 下午6:03, Tiwei Bie wrote: > > Add types and macros for packed ring. > > > > Signed-off-by: Tiwei Bie > > --- > > include/uapi/linux/virtio_config.h | 3 +++ > > include/uapi/linux/virtio_ring.h | 52 > >

Re: PROPOSAL: Extend inline asm syntax with size spec

2018-11-30 Thread Boris Petkov via Virtualization
On November 29, 2018 1:25:02 PM GMT+01:00, Segher Boessenkool wrote: >This will only be fixed from GCC 9 on, if the compiler adopts it. The >kernel wants to support ancient GCC, so it will need to have a >workaround >for older GCC versions anyway. What about backporting it, like Richard says?

Re: [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-30 Thread Jason Wang
On 2018/11/21 下午6:03, Tiwei Bie wrote: Add types and macros for packed ring. Signed-off-by: Tiwei Bie --- include/uapi/linux/virtio_config.h | 3 +++ include/uapi/linux/virtio_ring.h | 52 ++ 2 files changed, 55 insertions(+) diff --git