From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asias He Subject: Re: [PATCH v2 00/31] Implement user mode network for kvm tools Date: Fri, 01 Jul 2011 08:18:00 +0800 Message-ID: <4E0D1238.3020506@gmail.com> References: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> <4E0C96FF.4090801@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Stefan Hajnoczi , Pekka Enberg , Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:51746 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753456Ab1GAATr (ORCPT ); Thu, 30 Jun 2011 20:19:47 -0400 Received: by iwn6 with SMTP id 6so2369194iwn.19 for ; Thu, 30 Jun 2011 17:19:47 -0700 (PDT) In-Reply-To: <4E0C96FF.4090801@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On 06/30/2011 11:32 PM, Anthony Liguori wrote: > On 06/30/2011 03:56 AM, Stefan Hajnoczi wrote: >> On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: >>> uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, >>> ICMP, >>> IPV4, UDP, TCP. So any network protocols above UDP/TCP should work as >>> well, >>> e.g., HTTP, FTP, SSH, DNS. >> >> There is an existing uIP which might cause confusion, not sure if >> you've seen it. First I thought you were using that :). >> >> http://en.wikipedia.org/wiki/UIP_(micro_IP) > > Is the primary motivation here to allow unprivileged guests with > networking without providing unprivileged access to raw networking or > just to make networking Just Work? > > We've explored various things in the past like using a fscap based > helper to open tap devices which can help with the Just Works parts. Does qemu use fscap? > > Usermode TCP/IP can be quite cumbersome for users as things like ping > and ip6 won't work properly. Yes, usermode TCP/IP do have limits. But it's more cumbersome for user to setup bridge/nat thing with privileged networking. The network setup is a headache for some users. This patchset implements things like 'qemu -net user' without the slirp. I just took at a look the LOC in qemu and uip. qemu.git$ cat slirp/*.{c,h} net/slirp.{c,h}| wc -l 11514 kernel.git/tools/kvm$ cat uip/*.{c,h} include/kvm/uip.h | wc -l 1312 -- Best Regards, Asias He