From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC] Discuss about an new idea "Vsock over Virtio-net" Date: Fri, 30 Nov 2018 07:52:51 -0500 Message-ID: <20181130075134-mutt-send-email-mst@kernel.org> References: <5BECEE53.7090408@huawei.com> <20181115015547-mutt-send-email-mst@kernel.org> <61d57505-7ff6-23c6-d26c-6a0062e08445@redhat.com> <20181129085049-mutt-send-email-mst@kernel.org> <7e78fc3d-0d5a-090f-476d-03ad490ff8a2@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: jiangyiwen , stefanha@redhat.com, stefanha@gmail.com, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org To: Jason Wang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34322 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbeLAACI (ORCPT ); Fri, 30 Nov 2018 19:02:08 -0500 Content-Disposition: inline In-Reply-To: <7e78fc3d-0d5a-090f-476d-03ad490ff8a2@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 wrote: > > > > > Hi Stefan, Michael, Jason and everyone, > > > > > > > > > > Several days ago, I discussed with jason about "Vsock over Virtio-net". > > > > > This idea has two advantages: > > > > > First, it can use many great features of virtio-net, like batching, > > > > > mergeable rx buffer and multiqueue, etc. > > > > > Second, it can reduce many duplicate codes and make it easy to be > > > > > maintained. > > > > I'm not sure I get the motivation. Which features of > > > > virtio net are relevant to vsock? > > > > > > Vsock is just a L2 (and above) protocol from the view of the device. > > I don't believe so. I think virtio-vsock operates at a transport level. > > There is in theory a bit of network level but we don't really implement > > it as it's only host to guest. I am not aware of any data link > > functionality n virtio-vsock. virtio-vsock provides services such as > > connection-oriented communication, reliability, flow control and > > multiplexing. > > > Ok, consider it doesn't implement L2, it's pretty fit for virtio-net I > believe? > > > > > > > So I > > > think we should answer the question why we need two different paths for > > > networking traffic? Or what is the fundamental reason that makes vsock does > > > not go for virtio-net? > > So virtio-vsock ensures reliability. > > > It's done at the level of protocol instead of virtio transport or virtio > device. > > > > 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 always free to > > discard any unacked data. > > > Virtio-net knows nothing above L2, so they are totally transparent to device > itself. I still don't get why not using virtio-net instead. > > > Thanks Is your question why is virtio-vsock used instead of TCP on top of IP on top of virtio-net? > > > > > > > > I agree they could be different type of devices but codes could be shared in > > > both guest and host (or even qemu) for not duplicating features(bugs). > > > > > > Thanks > > > > > > > > > > The ones that you mention > > > > all seem to be mostly of use to the networking stack. > > > > > > > >